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

Merge updates from the upstream. #6

Merged
merged 50 commits into from
Oct 2, 2019
Merged

Conversation

jamesbibby
Copy link

@jamesbibby jamesbibby commented Sep 30, 2019

Contains the following updates:

tecbot#159 (DeleteRange DeleteRangeCF)
tecbot#163 (Slice helpers)
tecbot#161 (Correct default value for SetWriteBufferSize in comment)
tecbot#172 (Allow users to implement PartialMergeMulti)
tecbot#169 (Add prefix same as start to read options)
tecbot#166 (Add new functions to api)
tecbot#170 (Add PutLogData support for WriteBatch object)
tecbot#164 (improve documentation of SetWALReconveryMode and WALIterator)
tecbot#173 (Workaround for Linux 32-bit build)
tecbot#119 (use rocksdb_free)

This is a combination of some new features and api entries as well as some bug fixes and cleanup of the way memory allocated by rocksdb is freed.

ananclub and others added 30 commits October 19, 2016 13:13
* 'master' of https://github.com/tecbot/gorocksdb:
  Add pinned slices
  Add *DB.SetOptions().
  Add support for opening a db with TTL support
  fix GetApproximateSizes
  fix memory leak in deleting filterpolicy and mergeoperator value
  Add GetStatisticsString method to Options
  add wrapper for GetOptionsFromString
Correct default value for SetWriteBufferSize in comment
Kirill Abrosimov and others added 20 commits July 26, 2019 11:59
- this option was not exposed but is available in c.h
- setting to true ensures a prefix-seek iterator only iterates over values matching the prefix

ref: https://github.com/facebook/rocksdb/wiki/Prefix-Seek-API-Changes#prefix-seek-api
The current PartialMerge function accepts a left and right operand and is called many times by this function: https://github.com/DataDog/gorocksdb/blob/master/merge_operator.go#L100 This means implementors may have to deserialize / unmarshal those byte arrays into comparable objects for merging many times.

Proposal:
Split the interface.   MergeOperator only requires that you implement `FullMerge(key, existingValue []byte, operands [][]byte) ([]byte, bool)`.    In addition, you can implement either `PartialMerge(key, leftOperand, rightOperand []byte) ([]byte, bool)` or `PartialMergeMulti(key []byte, operands [][]byte) ([]byte, bool)`.    In `gorocksdb_mergeoperator_partial_merge_multi` I do a type switch to see if either PartialMerger or MultiMerger are implemented.   This should result in the same functionality for all existing users, but give users the option to implement PartialMergeMulti if it is more efficient for their use case.

Tests:
I added tests that result in actual merges taking place.   By setting a value, compacting, then doing multiple merge operations, the test ensures that both a PartialMerge and a FullMerge occur.
Allow users to implement PartialMergeMulti
Add PutLogData support for WriteBatch object
improve documentation of SetWALReconveryMode and WALIterator
…dings-pr

Add bindings for lowering CPU and IO priority of thread pools
…-on-armhf

Workaround for Linux 32-bit build
…ty-c-bindings-pr

Revert "Add bindings for lowering CPU and IO priority of thread pools"
Copy link
Member

@akrylysov akrylysov left a comment

Choose a reason for hiding this comment

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

Looks good. Btw, can we enable the CI for this repo? .travis.yml is there, but the integration is not enabled.

@jamesbibby jamesbibby merged commit aa1f449 into master Oct 2, 2019
@jamesbibby jamesbibby deleted the bibby/merge-upstream branch October 2, 2019 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants