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

Use conditional mutations for AccumuloStore. Add checks for status and putRepo #4160

Merged

Conversation

DomGarguilo
Copy link
Member

Closes #4114

@DomGarguilo DomGarguilo self-assigned this Jan 12, 2024
@DomGarguilo DomGarguilo changed the title Use conditional mutations for AccumuloStore Use conditional mutations for AccumuloStore. Add checks for status and putRepo Jan 19, 2024
@DomGarguilo DomGarguilo marked this pull request as ready for review January 19, 2024 19:16
@DomGarguilo
Copy link
Member Author

Marked this PR as ready for review. Leaving other checks to be done in follow on PRs.

In this PR:

  • Converted FateMutatorImpl to use ConditionalMutations
  • Added a method (FateMutatorImpl.requireStatus) add a condition that checks the status value is what we expect and use it in AccumuloStore.create(). Created a new Iterator to make this possible
  • Added a condition to putRepo() to make sure the spot we are inserting into is empty.
  • Added a new IT to test the two mentioned added checks.

DomGarguilo and others added 3 commits January 22, 2024 10:12
…tionalMutations

# Conflicts:
#	core/src/main/java/org/apache/accumulo/core/fate/accumulo/AccumuloStore.java
#	core/src/main/java/org/apache/accumulo/core/fate/accumulo/FateMutatorImpl.java
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AccumuloStoreIT extends SharedMiniClusterBase {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a nice test. If possible would be nice to eventually run the test against Zookeeper also like #4202. If it makes sense could be a follow on.

@DomGarguilo DomGarguilo merged commit 11949de into apache:elasticity Jan 30, 2024
8 checks passed
@DomGarguilo DomGarguilo deleted the accStoreConditionalMutations branch January 30, 2024 15:03
@ctubbsii ctubbsii added this to the 4.0.0 milestone Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants