In support of secondary indexes, we have a need for a Scan to return multiple versions during index maintenance. This occurs when:
- a row for an indexed table is updated which causes
- the old index row to be deleted
- the new index row to be added
- a query is issued against the table which would cause the index to be used which causes the index updates to be written to HBase but not yet committed.
- a rollback occurs
In this case, we need to issue two point deletes: one for the new index row that was added and one for the old index row that was deleted. Ideally, we'd like to do this in a single scan, but instead we're doing two scans: one with a visibility of SNAPSHOT and one with a visibility of SNAPSHOT_EXCLUDE_CURRENT. This works but is going to impact performance.
If we could do a single scan and get back both Puts, that would be ideal. It's somewhat related to TEPHRA-50, in that one of the Puts would represent a deletion, but we'd want to honor the filtering of inflight and invalid transactions in the scan. We could likely have our own scan and copy/paste your filter, but that's pretty ugly.