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

Improve index conflict handler validation #7296

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

pkoenig10
Copy link
Member

AtlasDB does not allow schemas with a cell-referencing index whose primary table uses a conflict handler that checks for write-write conflicts but is not specifically RETRY_WRITE_WRITE (for example, SERIALIZABLE).

We don't need to require RETRY_WRITE_WRITE specifically, we just want to make sure that write-write conflicts are checked.

@@ -292,10 +292,10 @@ public void validate() {
"In index, a component derived from column must reference an existing column");
}

if (indexMetadata.getIndexType().equals(IndexType.CELL_REFERENCING)) {
if (!indexMetadata.getIndexType().equals(IndexType.ADDITIVE)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This condition is equivalent, but now it:

  • Matches the framing of the error message.
  • Is restrictive by default, providing additional protection if we introduce a new IndexType in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant