-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Adding support to create GSI containers #48480
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
Open
mbhaskar
wants to merge
20
commits into
Azure:main
Choose a base branch
from
mbhaskar:global-secondary-index
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7ba9119
Adding support to create GSI containers
mbhaskar 8136ea2
Refactoring to take ID instead of RID
mbhaskar 08e1097
Renaming fields and properties
mbhaskar f5b6348
updating javadoc and method names accordingly
mbhaskar 1dca938
Address PR review comments: rename mv/view to gsi, fix javadocs, fix …
mbhaskar 5e9080e
Add GSI integration test pipeline with pre-provisioned Cosmos account…
mbhaskar 395febf
updating correct parameters
mbhaskar be17766
- moving method from ModelBridgeInternal to ImplementationBridgeHelpers
mbhaskar 97f8f31
Fixing initializer in helper
mbhaskar ccc0eeb
fixing the test
mbhaskar e0f5a74
Retriggering tests to clear stuck pipeline
mbhaskar 201ba6e
Merge branch 'main' into global-secondary-index
mbhaskar 500004c
Resolve merge conflicts with upstream/main
mbhaskar c525d62
Make GSI sourceContainerId and definition immutable
mbhaskar 0caa9c5
Adding additional tests
mbhaskar c8f60bb
Support both legacy and new GSI wire format property names
mbhaskar 00a0c91
Removing the GSI container list API from container properties as per …
mbhaskar 891725d
Address PR review feedback for GSI APIs
mbhaskar 17d4a76
Add CHANGELOG entry for Global Secondary Index (GSI) support
mbhaskar d13ee92
Merge remote-tracking branch 'upstream/main' into global-secondary-index
mbhaskar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
426 changes: 426 additions & 0 deletions
426
...cosmos-tests/src/test/java/com/azure/cosmos/rx/GlobalSecondaryIndexContainerCrudTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
317 changes: 317 additions & 0 deletions
317
...cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GlobalSecondaryIndexTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
sdk/cosmos/azure-cosmos-tests/src/test/resources/gsi-testng.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| <!-- | ||
| ~ The MIT License (MIT) | ||
| ~ Copyright (c) 2018 Microsoft Corporation | ||
| ~ | ||
| ~ Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| ~ of this software and associated documentation files (the "Software"), to deal | ||
| ~ in the Software without restriction, including without limitation the rights | ||
| ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| ~ copies of the Software, and to permit persons to whom the Software is | ||
| ~ furnished to do so, subject to the following conditions: | ||
| ~ | ||
| ~ The above copyright notice and this permission notice shall be included in all | ||
| ~ copies or substantial portions of the Software. | ||
| ~ | ||
| ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| ~ SOFTWARE. | ||
| --> | ||
| <!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd"> | ||
| <suite name="gsi"> | ||
| <listeners> | ||
| <listener class-name="com.azure.cosmos.CosmosNettyLeakDetectorFactory"/> | ||
| </listeners> | ||
| <test name="gsi" group-by-instances="true"> | ||
| <groups> | ||
| <run> | ||
| <include name="gsi"/> | ||
| </run> | ||
| </groups> | ||
| <packages> | ||
| <package name="com.azure.cosmos.*"/> | ||
| </packages> | ||
| </test> | ||
| </suite> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...e-cosmos/src/main/java/com/azure/cosmos/models/CosmosGlobalSecondaryIndexBuildStatus.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| package com.azure.cosmos.models; | ||
|
|
||
| /** | ||
| * Represents the build status of a global secondary index as returned by the Azure Cosmos DB service. | ||
| */ | ||
| public enum CosmosGlobalSecondaryIndexBuildStatus { | ||
|
|
||
| /** | ||
| * The global secondary index has been fully built and is actively serving queries. | ||
| */ | ||
| ACTIVE("Active"), | ||
|
|
||
| /** | ||
| * The build status returned by the service is not a value that this SDK version recognizes, | ||
| * or no status was returned. | ||
| */ | ||
| UNKNOWN("Unknown"); | ||
|
|
||
| private final String overWireValue; | ||
|
|
||
| CosmosGlobalSecondaryIndexBuildStatus(String overWireValue) { | ||
| this.overWireValue = overWireValue; | ||
| } | ||
|
|
||
| /** | ||
| * Returns the {@link CosmosGlobalSecondaryIndexBuildStatus} that matches the provided wire value, or | ||
| * {@link #UNKNOWN} when the value is {@code null} or not recognized by this SDK version. | ||
| * | ||
| * @param value the over-the-wire status value returned by the service. | ||
| * @return the matching enum value, or {@link #UNKNOWN}. | ||
| */ | ||
| public static CosmosGlobalSecondaryIndexBuildStatus fromString(String value) { | ||
| if (value == null) { | ||
| return UNKNOWN; | ||
| } | ||
| for (CosmosGlobalSecondaryIndexBuildStatus status : values()) { | ||
| if (status.overWireValue.equalsIgnoreCase(value)) { | ||
| return status; | ||
| } | ||
| } | ||
| return UNKNOWN; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return this.overWireValue; | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.