Skip to content

Commit

Permalink
setup oracle correctly in stream writer dgraph-io#1968
Browse files Browse the repository at this point in the history
  • Loading branch information
mYmNeo committed Sep 4, 2024
1 parent 5d16ecf commit 1e11857
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stream_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ func (sw *StreamWriter) Flush() error {
if sw.db.orc != nil {
sw.db.orc.Stop()
}

if curMax := sw.db.orc.readTs(); curMax >= sw.maxVersion {
sw.maxVersion = curMax
}

sw.db.orc = newOracle(sw.db.opt)
sw.db.orc.nextTxnTs = sw.maxVersion
sw.db.orc.txnMark.Done(sw.maxVersion)
Expand Down

0 comments on commit 1e11857

Please sign in to comment.