vinyl: fix error in mem_restore on prepared statement
Between prepare and commit of a transaction it is possible that some prepared statements are read from mem. Prepared statement has abnomal lsn > MAX_LSN. If version of the index is changed after return of a prepared statement and the iterator is placed to read view, the restart and restore on a such prepared statement could lead to restore on LSN bigger than vlsn. Example: FIBER 1 FIBER 2 box.begin() replace {1}, lsn=MAX_LSN+1 replace {2}, lsn=MAX_LSN+1 prepare vy_tx ... ->->-> open iterator read {1},lsn=MAX_LSN+1 from mem yield ... <-<-<- commit vy_tx replace {1, 1},lsn=100 send iterator to read view ->->-> iterator read view = 100 index version changed - restore on last_stmt last_stmt = {1},lsn=MAX_LSN+1 last_stmt LSN > iterator VLSN ?????????????????????? Lets return in such situations the next key.
Loading
Please register or sign in to comment