-
Notifications
You must be signed in to change notification settings - Fork 16
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
collection limit rollback change #929
Conversation
DEFAULT_INDEXES_AVAILABLE_PER_DATABASE 50 to 100, fail on DB 50 guardrail
src/main/java/io/stargate/sgv2/jsonapi/config/DatabaseLimitsConfig.java
Outdated
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/config/DatabaseLimitsConfig.java
Outdated
Show resolved
Hide resolved
...in/java/io/stargate/sgv2/jsonapi/service/operation/model/impl/CreateCollectionOperation.java
Show resolved
Hide resolved
...in/java/io/stargate/sgv2/jsonapi/service/operation/model/impl/CreateCollectionOperation.java
Outdated
Show resolved
Hide resolved
...in/java/io/stargate/sgv2/jsonapi/service/operation/model/impl/CreateCollectionOperation.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, suggested some changes.
...in/java/io/stargate/sgv2/jsonapi/service/operation/model/impl/CreateCollectionOperation.java
Outdated
Show resolved
Hide resolved
Do we need to add a new test case or two to make sure this is working as expected @Yuqi-Du ? |
I have tested this by writing our createCollection and deleteCollection code against Astra by using driver. |
…before, and rollback is enabled, then drop the collection
I have added a 'feature flag' to disable the rollback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
...in/java/io/stargate/sgv2/jsonapi/service/operation/model/impl/CreateCollectionOperation.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flags sent to the create collection doesn't look correct.
If possible can you add unit tests?
...in/java/io/stargate/sgv2/jsonapi/service/operation/model/impl/CreateCollectionOperation.java
Outdated
Show resolved
Hide resolved
...in/java/io/stargate/sgv2/jsonapi/service/operation/model/impl/CreateCollectionOperation.java
Outdated
Show resolved
Hide resolved
399fd85
to
d600cb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is a rollback change for Astra collection limit relaxation, and part of the short term solution we have for db collection limit.
In general, before violates Data API collection guardrail, if tenant hit the astra side guardrail and has indexes creation failure, Data api will also drop the table(plus indexes)
if index creation violates DB index limit and collection not existed before, and rollback is enabled, then drop the collection
Which issue(s) this PR fixes:
Fixes #912
Checklist