Addresses #893
Implement db->pre_acquire_read_lock(), db->dbt_pos_infty(), and db->dbt_neg_infty() functions. Example usage to lock entire table: db->pre_acquire_read_lock(db, txn, db->dbt_neg_infty(), NULL, db->dbt_pos_infty(), NULL); (Above is for db with no duplicates, i.e. primary index). For db with duplicates: db->pre_acquire_read_lock(db, txn, db->dbt_neg_infty(), db->dbt_neg_infty(), db->dbt_pos_infty(), db->dbt_pos_infty()); Will return same lock error codes as db calls do (when locks fail). 0 = success DB_LOCK_NOTGRANTED = failed to obtain the lock. We can theoretically sleep and try again here. If you want to grab from DBT* A to infinity.. db->pre_acquire_read_lock(db, txn, A, NULL, db->dbt_pos_infty(), NULL); git-svn-id: file:///svn/tokudb@4402 c7de825b-a66e-492c-adef-691d508d4ae1
Showing
Please register or sign in to comment