You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The column families created by TransactionDB->CreateColumnFamilies should be able to be used normally.
Actual behavior
TransactionDB->CreateColumnFamilies is able to complete successfully, but attempting to use the returned column families will result in an error along the lines of Column family id not found: ###. Using the non-batched TransactionDB->CreateColumnFamily multiple times works as expected.
I'm pretty sure the error is coming from PointLockManager::TryLock, because the created column families aren't being added to the lock manager. PessimisticTransactionDB overrides CreateColumnFamily in order to invoke lock_manager_->AddColumnFamily(*handle); on success, but CreateColumnFamilies isn't overridden and therefore probably isn't notifying lock_manager_.
Additionally, I'm fairly certain that the same problem would also occur with DropColumnFamily/DropColumnFamilies, except that it would never remove the column families from the lock manager.
However, I wouldn't be surprised if there were a few other bugs with the same root cause (i.e. methods not being overridden (properly) by *TransactionDB), so it would probably still be good if someone with a little more expertise than me could give it a look and might be able to catch a few more bugs while they were at it, as I don't have much of any experience with rocksdb's codebase beyond grep -rn :)
Expected behavior
The column families created by
TransactionDB->CreateColumnFamilies
should be able to be used normally.Actual behavior
TransactionDB->CreateColumnFamilies
is able to complete successfully, but attempting to use the returned column families will result in an error along the lines ofColumn family id not found: ###
. Using the non-batchedTransactionDB->CreateColumnFamily
multiple times works as expected.I'm pretty sure the error is coming from
PointLockManager::TryLock
, because the created column families aren't being added to the lock manager.PessimisticTransactionDB
overridesCreateColumnFamily
in order to invokelock_manager_->AddColumnFamily(*handle);
on success, butCreateColumnFamilies
isn't overridden and therefore probably isn't notifyinglock_manager_
.Additionally, I'm fairly certain that the same problem would also occur with
DropColumnFamily
/DropColumnFamilies
, except that it would never remove the column families from the lock manager.Steps to reproduce the behavior
Run this simple example program.
The text was updated successfully, but these errors were encountered: