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

Calling the merge function (the overload that takes string parameters) doesn't result in MergeOperator implementation being invoked #19

Open
kalyanaj opened this issue Feb 8, 2022 · 0 comments

Comments

@kalyanaj
Copy link

kalyanaj commented Feb 8, 2022

I was trying out this library for a merge scenario. I used the RocksDB.Merge(string, string value...) overload. I also specified a custom MergeOperator and set some breakpoints in the partial/full merge functions. However, I wasn't seeing those breakpoints getting hit even though I had called RocksDB.Merge with same keys and had triggered a compaction etc. Upon reading the code at

public void Merge(string key, string value, ColumnFamilyHandle cf = null, WriteOptions writeOptions = null, Encoding encoding = null)
, I see that it calls Native.Instance.rocksdb_put() and I don't see any difference between this and the RocksDB.Put(string key, string value, ...) call. Wanted to check if this is a typo in this Merge implementation or if I am missing anything else (I haven't had the chance yet to investigate/go deeper into understanding this repo).

    public void Merge(string key, string value, ColumnFamilyHandle cf = null, WriteOptions writeOptions = null, Encoding encoding = null)
    {
        Native.Instance.rocksdb_put(Handle, (writeOptions ?? DefaultWriteOptions).Handle, key, value, cf, encoding ?? DefaultEncoding);
    }
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

No branches or pull requests

1 participant