syncbase/store: Scan/Exec after Put/Delete in a transaction.

Make Scan() and Exec() in a transaction see the effects of a
Put() or Delete() in the same transaction, while the transaction
is still in-flight.

This change merges the snapshot.Scan() stream with the writes
array in the transaction (which contains put and delete
operations).

There was a choice to be made as to whether Scan/Exec should return
the state as of when it was called or whether later changes
in the transaction could find their way into the stream.  Since
we actively return the stream to the client (rather than waiting
on the client to call Advance), I felt it was less suprprising to
return the state when Scan/Exec was called.

Note: Since Exec can call Scan multiple times, I changed the
implementation of KeyValueStream to create all of the streams
from Scan at the start.

Change-Id: I70d19964e96dd45832122d6ce6c93c8ff35089d8
8 files changed
tree: 0d71f8da1a95850348979e7a8d542cc8edd62a4f
  1. v23/
  2. x/
  3. .gitignore
  4. AUTHORS
  5. CONTRIBUTORS
  6. LICENSE
  7. PATENTS
  8. VERSION