-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
Hi,
The current implementation for merging throws a RocksDbSharp.RocksDbException: 'Corruption: Error: Could not perform merge.'
After some investigation, I believe it happens because the parameters success and newValueLength of the methods PartialMerge and FullMerge are required to be set by the user:
rocksdb-sharp/RocksDbSharp/MergeOperator.cs
Lines 7 to 13 in 5b4b0bc
| public interface MergeOperator | |
| { | |
| string Name { get; } | |
| IntPtr PartialMerge(IntPtr key, UIntPtr keyLength, IntPtr operandsList, IntPtr operandsListLength, int numOperands, IntPtr success, IntPtr newValueLength); | |
| IntPtr FullMerge(IntPtr key, UIntPtr keyLength, IntPtr existingValue, UIntPtr existingValueLength, IntPtr operandsList, IntPtr operandsListLength, int numOperands, IntPtr success, IntPtr newValueLength); | |
| void DeleteValue(IntPtr value, UIntPtr valueLength); | |
| } |
I got rid off the exception by adding the out paramater modifiers to the parameters mentioned above.
Do you accept contributions? As mentioned in commit 32f2ea7, the interface can certainly be more helpful to users ;)
Thanks to anyone involved with the project!
Metadata
Metadata
Assignees
Labels
No labels