Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP

Loading…

Modifications are not visible within transaction #19

Closed
yoshinorim opened this Issue · 3 comments

2 participants

@yoshinorim
Owner

rocksdb.delete test case failed because deletes were not visible within transaction. Transactions are are currently started with GetSnapshot().

@yoshinorim yoshinorim added the bug label
@yoshinorim yoshinorim self-assigned this
@yoshinorim
Owner

So far I have found that changes are not visible when doing non-locking, range or full table scan.

I think the root cause is that changes (Rdb_transaction.changes -- Row_table)
are ignored at ha_rocksdb::rnd_next_with_direction() for non-locking
reads. For example, 1. create empty table, 2. begin; 3. insert; 4. select; => then select returns empty result. I confirmed scan_it->Valid() returned false at ha_rocksdb::rnd_next_with_direction(), without checking trx->changes.

I think merging trx->changes and scan_it is needed. I assume secondary index scan also needs merging too. Merging means:

  1. key existing only on trx->changes (including tombstone) => use trx->changes
  2. key existing only on scan_it => use scan_it
  3. key existing both (including tombstone) => use trx->changes

2 and 3 would be easy. 1 needs more discussions about how to implement efficiently.

@yoshinorim yoshinorim removed their assignment
@yoshinorim
Owner

I pushed rocksdb.transaction test case to cover insert/update/delete.

@spetrunia spetrunia was unassigned by yoshinorim
@yoshinorim yoshinorim self-assigned this
@yoshinorim yoshinorim closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.