Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross Partition Execution Context Refactor #1260

Merged
merged 39 commits into from
Mar 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
a001801
realized that this will be a lot of work
bchong95 Jan 8, 2020
f70d18a
merged
bchong95 Jan 15, 2020
f8359f2
wired up continuation token on the write path
bchong95 Jan 15, 2020
ab6bcc1
wiring continuation new continuation token in the read path
bchong95 Jan 17, 2020
a5fa91d
updated distinct and group by
bchong95 Jan 18, 2020
b50ae6d
drafted out code
bchong95 Jan 21, 2020
02e95ca
merged
bchong95 Jan 22, 2020
689fe8f
merged
bchong95 Jan 25, 2020
81418d0
wired in serialize state
bchong95 Jan 25, 2020
658d3f7
merged
bchong95 Jan 29, 2020
f4e689e
fixed test cases
bchong95 Jan 29, 2020
2ced726
merged
bchong95 Jan 29, 2020
3e470e0
I give up
bchong95 Jan 29, 2020
d5ff581
can't do it
bchong95 Jan 30, 2020
7ebd158
added min max continuation token
bchong95 Feb 13, 2020
230193c
merged
bchong95 Feb 13, 2020
20000cb
removed TryGetContinuationToken
bchong95 Feb 13, 2020
e76d053
fixed random bugs
bchong95 Feb 14, 2020
d9455b1
fixed more bugs
bchong95 Feb 14, 2020
ca3d0cf
about to gut out RequestContinuationToken and just wire through Cosmo…
bchong95 Feb 27, 2020
fb031f3
made input a cosmos element
bchong95 Feb 28, 2020
8d8279f
returning continuation token instead
bchong95 Feb 28, 2020
1e31ac2
merged
bchong95 Feb 28, 2020
4fe4933
updated tests
bchong95 Feb 28, 2020
abec934
resolved iteration comments
bchong95 Mar 2, 2020
144364f
broke up parallel execution context into different files based on stages
bchong95 Mar 2, 2020
26e2fc5
refactored parrallel resume code
bchong95 Mar 3, 2020
3f65c71
broke order by into separate files
bchong95 Mar 3, 2020
f0d2874
refactored code
bchong95 Mar 4, 2020
c52f60d
fixed bugs
bchong95 Mar 4, 2020
a3b2d5f
merged
bchong95 Mar 5, 2020
c894ddc
resolved iteration comments
bchong95 Mar 6, 2020
6494d65
resolved iteration comments
bchong95 Mar 9, 2020
69d0985
Update Microsoft.Azure.Cosmos/src/Query/Core/ExecutionContext/OrderBy…
bchong95 Mar 11, 2020
78339f0
added tests and fixed off by one error
bchong95 Mar 12, 2020
6fcac1a
Merge branch 'master' into users/brchon/Query/ExecutionContextFactory…
bchong95 Mar 12, 2020
a1faaa4
Merge branch 'users/brchon/Query/ExecutionContextFactoryRefactor' of …
bchong95 Mar 12, 2020
2737293
fixed typo
bchong95 Mar 12, 2020
8c85cae
merged
bchong95 Mar 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed more bugs
  • Loading branch information
bchong95 committed Feb 14, 2020
commit d9455b14cef0a33cdf9040cdc3b0230eb07bbc06
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,21 @@ public override async Task<QueryResponseCore> DrainAsync(int maxElements, Cancel
QueryResponseCore queryResponseCore;
if (this.distinctQueryType == DistinctQueryType.Ordered)
{
DistinctContinuationToken distinctContinuationToken = new DistinctContinuationToken(
sourceToken: sourceResponse.ContinuationToken,
distinctMapToken: this.distinctMap.GetContinuationToken());
string updatedContinuationToken;
if (this.IsDone)
{
updatedContinuationToken = null;
}
else
{
updatedContinuationToken = new DistinctContinuationToken(
sourceToken: sourceResponse.ContinuationToken,
distinctMapToken: this.distinctMap.GetContinuationToken()).ToString();
}

queryResponseCore = QueryResponseCore.CreateSuccess(
result: distinctResults,
continuationToken: distinctContinuationToken.ToString(),
continuationToken: updatedContinuationToken,
disallowContinuationTokenMessage: null,
activityId: sourceResponse.ActivityId,
requestCharge: sourceResponse.RequestCharge,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public async Task TestCosmosQueryPartitionKeyDefinition()

CosmosQueryExecutionContextFactory.InputParameters inputParameters = new CosmosQueryExecutionContextFactory.InputParameters(
sqlQuerySpec: sqlQuerySpec,
initialUserContinuationToken: null,
initialUserContinuationToken: StringRequestContinuationToken.Null,
maxConcurrency: queryRequestOptions?.MaxConcurrency,
maxItemCount: queryRequestOptions?.MaxItemCount,
maxBufferedItemCount: queryRequestOptions?.MaxBufferedItemCount,
Expand Down Expand Up @@ -310,31 +310,31 @@ public async Task TestCosmosQueryPartitionKeyDefinition()
},
new List<string>() { "test" },
false,
null,
StringRequestContinuationToken.Null,
func)).Result);

components.Add((await DistinctDocumentQueryExecutionComponent.TryCreateAsync(
ExecutionEnvironment.Client,
null,
StringRequestContinuationToken.Null,
func,
DistinctQueryType.Ordered)).Result);

components.Add((await SkipDocumentQueryExecutionComponent.TryCreateAsync(
ExecutionEnvironment.Client,
5,
null,
StringRequestContinuationToken.Null,
func)).Result);

components.Add((await TakeDocumentQueryExecutionComponent.TryCreateLimitDocumentQueryExecutionComponentAsync(
ExecutionEnvironment.Client,
5,
null,
StringRequestContinuationToken.Null,
func)).Result);

components.Add((await TakeDocumentQueryExecutionComponent.TryCreateTopDocumentQueryExecutionComponentAsync(
ExecutionEnvironment.Client,
5,
null,
StringRequestContinuationToken.Null,
func)).Result);

return (components, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ public async Task TestNegativeDistinctComponentCreation()
{
TryCatch<IDocumentQueryExecutionComponent> tryCreateWhenSourceFails = await DistinctDocumentQueryExecutionComponent.TryCreateAsync(
ExecutionEnvironment.Client,
null,
StringRequestContinuationToken.Null,
FailToCreateSource,
DistinctQueryType.Ordered);

Expand Down