@@ -725,7 +725,7 @@ func (s *spannerCoordinator) assignEntries(ctx context.Context, entries []*tesse
725
725
726
726
_ , err := s .dbPool .ReadWriteTransaction (ctx , func (ctx context.Context , txn * spanner.ReadWriteTransaction ) error {
727
727
// First we need to grab the next available sequence number from the SeqCoord table.
728
- row , err := txn .ReadRowWithOptions (ctx , "SeqCoord" , spanner.Key {0 }, []string {"id" , "next" }, & spanner. ReadOptions { LockHint : spannerpb . ReadRequest_LOCK_HINT_EXCLUSIVE })
728
+ row , err := txn .ReadRow (ctx , "SeqCoord" , spanner.Key {0 }, []string {"id" , "next" })
729
729
if err != nil {
730
730
return fmt .Errorf ("failed to read SeqCoord: %w" , err )
731
731
}
@@ -762,7 +762,8 @@ func (s *spannerCoordinator) assignEntries(ctx context.Context, entries []*tesse
762
762
763
763
// TODO(al): think about whether aligning bundles to tile boundaries would be a good idea or not.
764
764
m := []* spanner.Mutation {
765
- // Insert our newly sequenced batch of entries into Seq,
765
+ // Insert our newly sequenced batch of entries into Seq, this will cause the TX to abort if
766
+ // someone else has put a batch there.
766
767
spanner .Insert ("Seq" , []string {"id" , "seq" , "v" }, []any {0 , int64 (next ), data }),
767
768
// and update the next-available sequence number row in SeqCoord.
768
769
spanner .Update ("SeqCoord" , []string {"id" , "next" }, []any {0 , int64 (next ) + int64 (num )}),
0 commit comments