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

Adding readMany api that reads many documents at once based on id and… #8123

Merged

Conversation

mbhaskar
Copy link
Member

@mbhaskar mbhaskar commented Feb 12, 2020

Adding readMany api that reads many documents at once based on id and partitionkey

This avoids queryplan round trip, and does query only required partitions for required elements.

… partitionkey.

This avoids queryplan round trip, and does query only required partitions for required elements.
@mbhaskar mbhaskar requested a review from moderakh February 12, 2020 02:54
@moderakh moderakh marked this pull request as ready for review February 13, 2020 02:17
…nternalapi

# Conflicts:
#	sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/BridgeInternal.java
#	sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java
#	sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/rx/ParallelDocumentQueryTest.java
@mbhaskar
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@moderakh moderakh self-requested a review February 13, 2020 03:39
@moderakh
Copy link
Contributor

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@moderakh moderakh left a comment

Choose a reason for hiding this comment

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

I added special support for when partition-key is /id and improved query-spec generation.

LGTM on Bhaskar portion of changes.

@moderakh
Copy link
Contributor

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

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

Looks good, added one suggestion, and one question.

@@ -26,7 +26,9 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import io.micrometer.core.instrument.MeterRegistry;
import org.apache.commons.lang3.tuple.Pair;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: No need for this import.

Copy link
Contributor

Choose a reason for hiding this comment

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

will fix. ack.

@@ -539,4 +547,44 @@ private void queryWithContinuationTokensAndPageSizes(String query, int[] pageSiz

return receivedDocuments;
}

//TODO: Fix the test for GW mode
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need to fix this for gateway ?

Copy link
Contributor

Choose a reason for hiding this comment

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

later this needs to be fixed. for some reason doesn't work now.

@moderakh
Copy link
Contributor

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@moderakh moderakh merged commit 6c11cca into Azure:feature/cosmos/v4 Feb 13, 2020
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.

4 participants