Skip to content

Commit 97509eb

Browse files
authored
Merge branch 'main' into users/akataria/nonStreamingOrderBy
2 parents 6f49c75 + 49743ea commit 97509eb

File tree

9,627 files changed

+336644
-200763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,627 files changed

+336644
-200763
lines changed

.github/workflows/event-processor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}
3434
steps:
3535
- name: 'Az CLI login'
36-
uses: azure/login@v1
36+
uses: azure/login@v2
3737
with:
3838
client-id: ${{ secrets.AZURE_CLIENT_ID }}
3939
tenant-id: ${{ secrets.AZURE_TENANT_ID }}

.vscode/cspell.json

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@
136136
"sdk/cosmos/azure-cosmos-spark_3-2_2-12/**",
137137
"sdk/cosmos/azure-cosmos-spark_3-3_2-12/**",
138138
"sdk/cosmos/azure-cosmos-spark_3-4_2-12/**",
139+
"sdk/cosmos/azure-cosmos-spark_3-5_2-12/**",
139140
"sdk/core/azure-core-test/**",
140141
"sdk/cosmos/azure-cosmos-encryption/**",
141142
"sdk/cosmos/azure-cosmos-spark_3_2-12/**",
142143
"sdk/spring/azure-spring-data-cosmos/**",
144+
"sdk/cosmos/azure-cosmos-kafka-connect/**",
143145
"sdk/deviceupdate/azure-iot-deviceupdate/**",
144146
"sdk/e2e/src/**",
145147
"sdk/eventgrid/azure-messaging-eventgrid-cloudnative-cloudevents/**",
@@ -186,15 +188,13 @@
186188
"sdk/servicebus/azure-messaging-servicebus-stress/templates/**",
187189
"sdk/servicebus/azure-messaging-servicebus-stress/workbooks/**",
188190
"sdk/servicebus/azure-messaging-servicebus-stress/Dockerfile",
189-
"sdk/search/azure-search-documents/**",
190191
"sdk/storage/azure-storage-internal-avro/**",
191192
"sdk/storage/azure-storage-queue/**",
192193
"sdk/synapse/azure-analytics-synapse-accesscontrol/**",
193194
"sdk/synapse/azure-analytics-synapse-managedprivateendpoints/**",
194195
"sdk/synapse/azure-analytics-synapse-monitoring/**",
195196
"sdk/synapse/azure-analytics-synapse-spark/**",
196197
"sdk/storage/azure-storage-blob-nio/**",
197-
"sdk/tables/.idea/**",
198198
"sdk/template/azure-sdk-template/**",
199199
"sdk/template/azure-sdk-template-three/**",
200200
"sdk/template/azure-sdk-template-two/**",
@@ -205,18 +205,23 @@
205205
"sdk/videoanalyzer/azure-media-videoanalyzer-edge/**",
206206
"sdk/synapse/azure-analytics-synapse-artifacts/**",
207207
"sdk/webpubsub/azure-messaging-webpubsub/**",
208-
"sdk/tables/azure-data-tables/**",
209208
"sdk/textanalytics/azure-ai-textanalytics/**",
210209
"sdk/storage/azure-storage-file-datalake/**",
211210
"sdk/maps/azure-maps-elevation/**",
212211
"sdk/maps/azure-maps-geolocation/**",
213212
"sdk/maps/azure-maps-timezone/**",
214-
"sdk/search/.idea/**",
215213
"sdk/devcenter/azure-developer-devcenter/**",
216214
"sdk/loadtesting/azure-developer-loadtesting/**",
217215
"sdk/serialization/azure-json-gson/**",
218216
"sdk/serialization/azure-json/**",
219-
"sdk/serialization/azure-xml/**"
217+
"sdk/serialization/azure-xml/**",
218+
"sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/HotelsData.json",
219+
"sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/OcrSkillLanguage.java",
220+
"sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/PhoneticEncoder.java",
221+
"sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/StemmerTokenFilterLanguage.java",
222+
"sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/SnowballTokenFilterLanguage.java",
223+
"sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/TextTranslationSkillLanguage.java",
224+
"sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/TokenFilterName.java"
220225
],
221226
"words": [
222227
"adal",
@@ -225,6 +230,7 @@
225230
"amqp",
226231
"Amqp",
227232
"AMQP",
233+
"AOAI",
228234
"apacheavro",
229235
"Apim",
230236
"AUHours",
@@ -354,6 +360,7 @@
354360
"netapp",
355361
"Netezza",
356362
"odata",
363+
"OAI",
357364
"ODBC",
358365
"okhttp",
359366
"OTLP",
@@ -420,6 +427,42 @@
420427
"XLint"
421428
],
422429
"overrides": [
430+
{
431+
"filename": "sdk/search/azure-search-documents/**",
432+
"words": [
433+
"ADLS",
434+
"mysearch",
435+
"TFIDF",
436+
"Decompounder",
437+
"NGRAM",
438+
"Bangla",
439+
"Rslp",
440+
"vectorizer",
441+
"vectorizable",
442+
"vectorizers",
443+
"hnsw",
444+
"rerank",
445+
"reranker",
446+
"mytext",
447+
"myocr",
448+
"econo",
449+
"azsearch",
450+
"bokmaal",
451+
"bokmal",
452+
"adlsgen",
453+
"sorani",
454+
"mylocation",
455+
"myloc",
456+
"dari",
457+
"hitel"
458+
]
459+
},
460+
{
461+
"filename": "sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/HotelsData.json",
462+
"words": [
463+
"*"
464+
]
465+
},
423466
{
424467
"filename": "sdk/identity/cgmanifest.json",
425468
"words":[
@@ -723,7 +766,7 @@
723766
"words": [
724767
"Pfast",
725768
"Pdirect",
726-
"Pmulti",
769+
"Pmulti",
727770
"Psplit",
728771
"Pquery",
729772
"Pcfp",

common/perf-test-core/pom.xml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,21 @@
3434

3535
<properties>
3636
<relative.path.to.eng.folder>../..</relative.path.to.eng.folder>
37+
<test.dir>src/test/java</test.dir>
38+
<jacoco.skip>true</jacoco.skip>
39+
<!-- Configures the Java 9+ run to perform the required module exports, opens, and reads that are necessary for testing but shouldn't be part of the module-info. -->
40+
<javaModulesSurefireArgLine>
41+
--add-exports com.azure.core.test.perf/com.azure.perf.test.core=ALL-UNNAMED
42+
</javaModulesSurefireArgLine>
43+
3744
</properties>
3845

3946
<build>
4047
<plugins>
4148
<plugin>
4249
<groupId>org.apache.maven.plugins</groupId>
4350
<artifactId>maven-enforcer-plugin</artifactId>
44-
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} -->
51+
<version>3.4.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} -->
4552
<configuration>
4653
<rules>
4754
<bannedDependencies>
@@ -52,7 +59,7 @@
5259
<include>com.beust:jcommander:[1.78]</include> <!-- {x-include-update;com.beust:jcommander;external_dependency} -->
5360

5461
<include>io.projectreactor:reactor-core:[3.4.36]</include> <!-- {x-include-update;io.projectreactor:reactor-core;external_dependency} -->
55-
<include>io.vertx:vertx-codegen:[4.5.5]</include> <!-- {x-include-update;io.vertx:vertx-codegen;external_dependency} -->
62+
<include>io.vertx:vertx-codegen:[4.5.7]</include> <!-- {x-include-update;io.vertx:vertx-codegen;external_dependency} -->
5663
</includes>
5764
</bannedDependencies>
5865
</rules>
@@ -75,28 +82,46 @@
7582
<dependency>
7683
<groupId>com.azure</groupId>
7784
<artifactId>azure-core-http-netty</artifactId>
78-
<version>1.14.1</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
85+
<version>1.14.2</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
7986
</dependency>
8087
<dependency>
8188
<groupId>com.azure</groupId>
8289
<artifactId>azure-core-http-okhttp</artifactId>
83-
<version>1.11.19</version> <!-- {x-version-update;com.azure:azure-core-http-okhttp;dependency} -->
90+
<version>1.11.20</version> <!-- {x-version-update;com.azure:azure-core-http-okhttp;dependency} -->
8491
</dependency>
8592
<dependency>
8693
<groupId>com.azure</groupId>
8794
<artifactId>azure-core-http-jdk-httpclient</artifactId>
88-
<version>1.0.0-beta.11</version> <!-- {x-version-update;com.azure:azure-core-http-jdk-httpclient;dependency} -->
95+
<version>1.0.0-beta.12</version> <!-- {x-version-update;com.azure:azure-core-http-jdk-httpclient;dependency} -->
8996
</dependency>
9097
<dependency>
9198
<groupId>com.azure</groupId>
9299
<artifactId>azure-core-http-vertx</artifactId>
93-
<version>1.0.0-beta.16</version> <!-- {x-version-update;com.azure:azure-core-http-vertx;dependency} -->
100+
<version>1.0.0-beta.17</version> <!-- {x-version-update;com.azure:azure-core-http-vertx;dependency} -->
94101
</dependency>
95102
<dependency>
96103
<groupId>io.vertx</groupId>
97104
<artifactId>vertx-codegen</artifactId>
98-
<version>4.5.5</version> <!-- {x-version-update;io.vertx:vertx-codegen;external_dependency} -->
105+
<version>4.5.7</version> <!-- {x-version-update;io.vertx:vertx-codegen;external_dependency} -->
99106
<scope>provided</scope>
100107
</dependency>
108+
<dependency>
109+
<groupId>org.junit.jupiter</groupId>
110+
<artifactId>junit-jupiter-api</artifactId>
111+
<version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-api;external_dependency} -->
112+
<scope>test</scope>
113+
</dependency>
114+
<dependency>
115+
<groupId>org.junit.jupiter</groupId>
116+
<artifactId>junit-jupiter-engine</artifactId>
117+
<version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} -->
118+
<scope>test</scope>
119+
</dependency>
120+
<dependency>
121+
<groupId>org.junit.jupiter</groupId>
122+
<artifactId>junit-jupiter-params</artifactId>
123+
<version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-params;external_dependency} -->
124+
<scope>test</scope>
125+
</dependency>
101126
</dependencies>
102127
</project>

common/perf-test-core/src/main/java/com/azure/perf/test/core/RepeatingInputStream.java

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
package com.azure.perf.test.core;
55

6+
import com.azure.core.util.BinaryData;
7+
68
import java.io.IOException;
79
import java.io.InputStream;
810
import java.util.Random;
@@ -11,32 +13,44 @@
1113
* Represents a repeating input stream with mark support enabled.
1214
*/
1315
public class RepeatingInputStream extends InputStream {
14-
private static final int RANDOM_BYTES_LENGTH = Integer.parseInt(
15-
System.getProperty("azure.core.perf.test.data.buffer.size", "1048576")); // 1MB default;
1616
private static final byte[] RANDOM_BYTES;
1717
private final long size;
1818

1919
private long mark = 0;
2020
private long readLimit = Long.MAX_VALUE;
2121
private long pos = 0;
22-
22+
private final byte[] source;
2323
static {
24+
int randomLength = Integer.parseInt(
25+
System.getProperty("azure.core.perf.test.data.buffer.size", "1048576")); // 1MB default;
26+
2427
Random random = new Random(0);
25-
RANDOM_BYTES = new byte[RANDOM_BYTES_LENGTH];
28+
RANDOM_BYTES = new byte[randomLength];
2629
random.nextBytes(RANDOM_BYTES);
2730
}
2831

2932
/**
3033
* Creates an Instance of the repeating input stream.
3134
* @param size the size of the stream.
3235
*/
33-
public RepeatingInputStream(long size) {
36+
public RepeatingInputStream(long size) {
3437
this.size = size;
38+
this.source = RANDOM_BYTES;
39+
}
40+
41+
/**
42+
* Creates an instance of the stream which repeats the given buffer.
43+
* @param source the buffer to repeat. Must be relatively small and fit into memory.
44+
* @param size the size of the stream.
45+
*/
46+
public RepeatingInputStream(BinaryData source, long size) {
47+
this.size = size;
48+
this.source = source.toBytes();
3549
}
3650

3751
@Override
3852
public synchronized int read() {
39-
return (pos < size) ? (RANDOM_BYTES[(int) (pos++ % RANDOM_BYTES_LENGTH)] & 0xFF) : -1;
53+
return (pos < size) ? getByte(pos) : -1;
4054
}
4155

4256
@Override
@@ -50,12 +64,14 @@ public synchronized int read(byte[] b, int off, int len) {
5064
return -1;
5165
}
5266

53-
int readCount = Math.min(len, RANDOM_BYTES_LENGTH);
54-
long remaining = this.size - this.pos;
55-
if (remaining < readCount) {
56-
readCount = (int) remaining;
67+
int posSrc = (int)(pos % source.length);
68+
int readCount = Math.min(len, source.length - posSrc);
69+
70+
long remainingDest = this.size - this.pos;
71+
if (remainingDest < readCount) {
72+
readCount = (int) remainingDest;
5773
}
58-
System.arraycopy(RANDOM_BYTES, 0, b, off, readCount);
74+
System.arraycopy(source, posSrc, b, off, readCount);
5975
pos += readCount;
6076

6177
return readCount;
@@ -95,5 +111,9 @@ public int available() throws IOException {
95111
return (int) remaining;
96112
}
97113
}
114+
115+
private int getByte(long pos) {
116+
return source[(int)(pos % source.length)] & 0xFF;
117+
}
98118
}
99119

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
package com.azure.perf.test.core;
5+
6+
import com.azure.core.util.BinaryData;
7+
import org.junit.jupiter.params.ParameterizedTest;
8+
import org.junit.jupiter.params.provider.ValueSource;
9+
10+
import java.io.IOException;
11+
import java.io.InputStream;
12+
import java.nio.charset.StandardCharsets;
13+
import java.util.Collections;
14+
15+
import static org.junit.jupiter.api.Assertions.assertEquals;
16+
import static org.junit.jupiter.api.Assertions.assertTrue;
17+
18+
public class RepeatingInputStreamTests {
19+
@ParameterizedTest
20+
@ValueSource(ints = {100, 2 * 1024 * 1024})
21+
public void generateRandomStream(int length) throws IOException {
22+
RepeatingInputStream stream = new RepeatingInputStream(length);
23+
assertEquals(length, stream.available());
24+
assertTrue(stream.markSupported());
25+
26+
byte[] allBytes = readAllBytes(stream, length, length);
27+
28+
assertEquals(0, stream.available());
29+
stream.reset();
30+
assertEquals(length, stream.available());
31+
32+
assertContentEquals(allBytes, stream, 11);
33+
}
34+
35+
@ParameterizedTest
36+
@ValueSource(ints = {10, 100, 2 * 1024 * 1024})
37+
public void generateStreamFromSource(int length) throws IOException {
38+
String bufferStr = "Sample content - we'll repeat this string.";
39+
String expected = String.join("", Collections.nCopies((length/bufferStr.length()) + 1, bufferStr)).substring(0, length);
40+
41+
RepeatingInputStream stream = new RepeatingInputStream(BinaryData.fromString(bufferStr), length);
42+
assertEquals(length, stream.available());
43+
44+
byte[] allBytes = readAllBytes(stream, length, length);
45+
assertEquals(expected, new String(allBytes, StandardCharsets.UTF_8));
46+
stream.reset();
47+
48+
assertContentEquals(allBytes, stream, 37);
49+
}
50+
51+
private byte[] readAllBytes(InputStream actual, int step, int length) throws IOException {
52+
byte[] buffer = new byte[length];
53+
int pos = 0;
54+
int read;
55+
while ((read = actual.read(buffer, pos, step)) > 0) {
56+
pos += read;
57+
}
58+
59+
return buffer;
60+
}
61+
62+
private void assertContentEquals(byte[] expected, InputStream actual, int step) throws IOException {
63+
byte[] buffer = readAllBytes(actual, step, expected.length);
64+
for (int i = 0; i < expected.length; i ++) {
65+
assertEquals(expected[i], buffer[i]);
66+
}
67+
}
68+
}
69+

0 commit comments

Comments
 (0)