Skip to content

WriteBatch operations (put, delete) fail when using set_default_column_family but work with explicit column_family argument #176

@DisplayL

Description

@DisplayL

Description:

There appears to be a bug in how WriteBatch handles the default column family set via set_default_column_family.

Expected Behavior:

Calling write_batch.set_default_column_family(cf_handle) should allow subsequent calls to write_batch.put(key, value) and write_batch.delete(key) (or write_batch[key] = value and del write_batch[key]) to operate on the specified column family cf_handle.

Actual Behavior:

Operations that explicitly pass the column family handle work correctly:

write_batch.put(key, value, cf_handle) -> Works
write_batch.delete(key, cf_handle) -> Works

However, operations relying on the default column family set previously do not work as expected:

write_batch.set_default_column_family(cf_handle) write_batch.put(key, value) -> Fails (operation seems to have no effect, data not written to the intended CF)
write_batch.set_default_column_family(cf_handle) write_batch.delete(key) -> Fails (operation seems to have no effect, data not deleted from the intended CF)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions