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

Enable batch deletion in rocksDB #939

Merged
merged 7 commits into from Aug 16, 2018

Conversation

Projects
None yet
3 participants
@GalRogozinski
Contributor

GalRogozinski commented Aug 15, 2018

Description

This enables us to atomically delete batches of data from the DB

Fixes #921

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How Has This Been Tested?

A unit test has been added:

Checklist:

Please delete items that are not relevant.

  • My code follows the style guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

GalRogozinski added some commits Aug 14, 2018

@GalRogozinski GalRogozinski requested review from alon-e and hmoog Aug 15, 2018

@alon-e

This comment has been minimized.

Show comment
Hide comment
@alon-e

alon-e Aug 15, 2018

Contributor

To clarify: @GalRogozinski is it intentional that this PR will still not allow a dev to batch delete from the DB? (as the Tangle class has no new deleteBatch method).

also, it's not clear what the response of non-delete persistenceProviders should be to such a call - if we borrow from the Tangle.delete semantics, then a dev trying to delete, while running w/ ZMQ would get an UnsupportedOperationException:

    public void delete(Class<?> model, Indexable index) throws Exception {
            for(PersistenceProvider provider: persistenceProviders) {
                provider.delete(model, index);
            }
    }
Contributor

alon-e commented Aug 15, 2018

To clarify: @GalRogozinski is it intentional that this PR will still not allow a dev to batch delete from the DB? (as the Tangle class has no new deleteBatch method).

also, it's not clear what the response of non-delete persistenceProviders should be to such a call - if we borrow from the Tangle.delete semantics, then a dev trying to delete, while running w/ ZMQ would get an UnsupportedOperationException:

    public void delete(Class<?> model, Indexable index) throws Exception {
            for(PersistenceProvider provider: persistenceProviders) {
                provider.delete(model, index);
            }
    }

GalRogozinski added some commits Aug 16, 2018

@GalRogozinski

I am adding logic to Tangle.java + removing UnsupportedOperationException

@alon-e

alon-e approved these changes Aug 16, 2018

Issues addressed.

@alon-e alon-e changed the title from Batch deletion from rocksdb to Enable batch deletion in rocksDB Aug 16, 2018

@alon-e alon-e merged commit 5bd652f into iotaledger:dev Aug 16, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@GalRogozinski GalRogozinski referenced this pull request Aug 27, 2018

Merged

fix generics in RocksDbPersistenceProvider #956

3 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment