// Must run on a SC thread private void UpdateCommitId(string tableId, ulong commitId) { Debug.Assert(StarcounterEnvironment.IsOnScheduler()); LastPosition repl = Db.SQL<LastPosition>("SELECT p FROM LogStreamer.LastPosition p WHERE TableId = ?", tableId).First; if (repl == null) { repl = new LastPosition() { TableId = tableId, CommitId = commitId }; } else { repl.TableId = tableId; // needed so it shows up in the outbound log repl.CommitId = commitId; } }
// Must run on a SC thread private void UpdateCommitId(string table, ulong commitId) { string tableId = PeerTableIdPrefix + table; LastPosition repl = Db.SQL<LastPosition>("SELECT p FROM LogStreamer.LastPosition p WHERE TableId = ?", tableId).First; if (repl == null) { repl = new LastPosition() { TableId = tableId, CommitId = commitId, }; } else { repl.TableId = tableId; // needed so it shows up in the outbound log repl.CommitId = commitId; } }