AutoMQ/automq

[BUG] TransactionIndex fetch out of bound

Closed this issue · 0 comments

Concurrent Problem:

  1. [Thread1] ElasticTransactionIndex#append invoke stream.append , update the nextOffset=12478 but not assigned to lastAppend yet
  2. [Thread2] ElasticTransactionIndex#iterator read the transaction index, get endPosition=12478 and lastAppend=12444 future
  3. [Thread2] stream fetch out of bound

img_v3_0289_58832462-961d-4816-97d9-5e3b00f88f8g