Skip to content

Conversation

@djyou
Copy link
Member

@djyou djyou commented Aug 1, 2019

Fixes #5425

Azure Storage table query may return results with non-empty x-ms-continuation-NextPartitionKey but empty x-ms-continuation-NextRowKey, see https://docs.microsoft.com/en-us/rest/api/storageservices/query-timeout-and-pagination

The current Go SDK implementation couldn't follow the continuation token for these cases.

Reference to .NET implementation https://github.com/Azure/azure-storage-net/blob/fdc07726910ead3281b14b2769a92b2fea68bd97/Lib/Common/Table/TableContinuationToken.cs

  • The purpose of this PR is explained in this or a referenced issue.
  • The PR does not update generated files.
  • The PR targets the latest branch.
  • Tests are included and/or updated for code changes.
  • Updates to CHANGELOG.md are included.
  • Apache v2 license headers are included in each file.

@azuresdkci
Copy link

Can one of the admins verify this patch?

}

if ct.NextPartitionKey != "" && ct.NextRowKey != "" {
if ct.NextPartitionKey != "" || ct.NextRowKey != "" {
Copy link
Member

Choose a reason for hiding this comment

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

Can it ever be the case that NextRowKey is not empty but NextParitionKey is?

Copy link
Member Author

Choose a reason for hiding this comment

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

Storage docs didn't specifically mention if NextParitionKey could be empty, but it's a valid query to storage to have just NextRowKey.

Also from how other SDKs handle it, these three pagination headers NextTableName, NextPartitionKey, and NextRowKey don't have dependencies on each other. The non-empty ones will be added to the URL of the next request.

@jhendrixMSFT
Copy link
Member

Can you please retarget this PR against the latest branch?

@djyou djyou changed the base branch from master to latest August 3, 2019 01:22
@djyou djyou changed the base branch from latest to master August 3, 2019 01:23
@djyou
Copy link
Member Author

djyou commented Aug 3, 2019

Retarget to latest branch with this PR #5423
Closing this one.

@djyou djyou closed this Aug 3, 2019
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.

Table query not extracting and following continuation token properly

3 participants