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

Make SessionToken on QueryRequestOptions public #979

Merged
merged 11 commits into from
Nov 22, 2019

Conversation

dpgregory
Copy link
Contributor

Description

Made SessionToken public on QueryRequestOptions to allow querying of multiple documents with SessionToken.

Type of change

  • New feature (non-breaking change which adds functionality)

Closing issues

Closes #973

@msftclas
Copy link

msftclas commented Nov 6, 2019

CLA assistant check
All CLA requirements met.

@j82w
Copy link
Contributor

j82w commented Nov 6, 2019

/azp run

@@ -138,7 +138,7 @@ public class QueryRequestOptions : RequestOptions
///
/// </para>
/// </remarks>
internal string SessionToken { get; set; }
public string SessionToken { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a note to the changelog

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I've done this now, let me know if it's not correct

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though this is made public we need to wire it through the query stack right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding this is already done on the line 164:

RequestOptions.SetSessionToken(request, this.SessionToken);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I just want to make sure what the story will be. If a user does multiple point writes, then what session token will they send for the query?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point but also a different question.
SessionToken would be same as what is used for any ReadItemAsync.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything else I need to change, or are we all good now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope we are good to ship it. Thanks @dpgregory for your contributions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! No worries, it wasn't much!

@ausfeldt
Copy link
Contributor

ausfeldt commented Nov 6, 2019

/azp run

1 similar comment
@ausfeldt
Copy link
Contributor

ausfeldt commented Nov 6, 2019

/azp run

@j82w
Copy link
Contributor

j82w commented Nov 6, 2019

/AzurePipelines run

@ausfeldt
Copy link
Contributor

ausfeldt commented Nov 6, 2019

/azp run

@ausfeldt
Copy link
Contributor

ausfeldt commented Nov 6, 2019

/AzurePipelines help

@ausfeldt
Copy link
Contributor

ausfeldt commented Nov 6, 2019

/AzurePipelines run

@ausfeldt ausfeldt closed this Nov 6, 2019
@ausfeldt ausfeldt reopened this Nov 6, 2019
@ausfeldt
Copy link
Contributor

ausfeldt commented Nov 6, 2019

/azp run

j82w and others added 4 commits November 7, 2019 08:45
* Fix feed iterator for mocking

* Updated changelog

* Added method back

* Fixed type casting

* Removed additional internal abstract types. Added UT

* Removed unused variable

* Updated changelog

* Fixed tests
@dpgregory dpgregory requested a review from bchong95 as a code owner November 7, 2019 08:46
changelog.md Outdated
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## <a name="3.4.1"/> [3.4.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.4.1) - 2019-11-06

### Added

- [#853](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/979) Make SessionToken on QueryRequestOptions public.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this above 3.4.1 under the Unreleased tag. 3.4.1 is already released

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for all the azp comments. It turns out that Github had a bug that prevented the gates from running on forked repos.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. Sorry, I think I've got it in the right place now. This is my first contribution to open source project, so it's a learning experience. I thought it best to try and fix my own issue though.

@j82w
Copy link
Contributor

j82w commented Nov 7, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@j82w
Copy link
Contributor

j82w commented Nov 7, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@dpgregory
Copy link
Contributor Author

Is there anything else I need to do on this, or is it just waiting for someone to be free to look at it?

@kirankumarkolli
Copy link
Member

kirankumarkolli commented Nov 11, 2019

Thanks alot @dpgregory for your contributions.

@bchong95 , @sboshra please take a look.
This contract enables read-my-writes through queries as well.

j82w
j82w previously approved these changes Nov 11, 2019
@j82w j82w dismissed stale reviews from kirankumarkolli and themself via c55bf0d November 20, 2019 13:41
@j82w
Copy link
Contributor

j82w commented Nov 20, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@j82w
Copy link
Contributor

j82w commented Nov 21, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@j82w j82w merged commit 55d0d4b into Azure:master Nov 22, 2019
j82w pushed a commit that referenced this pull request Nov 22, 2019
* Make SessionToken on QueryRequestOptions public

* Fix mocking for FeedIterator and Response classes (#978)

* Fix feed iterator for mocking

* Updated changelog

* Added method back

* Fixed type casting

* Removed additional internal abstract types. Added UT

* Removed unused variable

* Updated changelog

* Fixed tests

* Updating package (#975)

* Update azure-pipelines-official.yml (#970)

* Update changelog with 979

* Move line in changelog to correct location

* Remove added in change log to correct location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retrieve multiple documents with Session Token
7 participants