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

Push partition key to epk range resolution out of RequestInvokerHandler to consumers #4384

Open
adityasa opened this issue Apr 2, 2024 · 4 comments
Assignees

Comments

@adityasa
Copy link
Contributor

adityasa commented Apr 2, 2024

RequestInvokerHandler is changing the FeedRangePartitionKey to FeedRangeEpk, (regardless of what the upstream asked for). Apart from obvious concerns of doing this at such a low level (in a rather blind manner), there are at least 2 issues that I see here. Upstream (say query enumerators) have no knowledge of this and no control over this. Test infra (for e.g. InMemoryContainer) does not seem to mimic this behavior (so we are missing coverage).

internal static async Task<FeedRange> ResolveFeedRangeBasedOnPrefixContainerAsync(

This was discussed in the SDK sync and acknowledged as something that should be addressed. This issue is logged to track this work.

@adityasa
Copy link
Contributor Author

adityasa commented Apr 2, 2024

@kirankumarkolli - fyi. Please reassign as appropriate.

@kirankumarkolli
Copy link
Member

@ealsur you were exploring if there are any gaps in CF (CFP, PULL) or feedrange API's any update?

@ealsur
Copy link
Member

ealsur commented Apr 4, 2024

CFP does not use HPK, it either sends a PKRangeId or an Epk, nothing else.

For CF Pull I don't know, we would need a real account to be able to test, there is no way to test this otherwise. Looking at the source code, it uses this:

private static async Task<IQueue<PartitionRangePageAsyncEnumerator<TPage, TState>>> InitializeEnumeratorsAsync(

public Task<TryCatch<List<FeedRangeEpk>>> MonadicGetFeedRangesAsync(
ITrace trace,
CancellationToken cancellationToken) => this.monadicDocumentContainer.MonadicGetFeedRangesAsync(
trace,
cancellationToken);

The output of that method is always FeedrangeEpk, so I would think it only uses FeedrangeEpk into the pipeline.

@kirankumarkolli
Copy link
Member

Thanks @ealsur , for now lets track it for HPK tests gaps coverage.

Wondering how we can reliably test this scenario with live account?

@kirankumarkolli kirankumarkolli self-assigned this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants