vinyl: don't track tuples that are already tracked in secondary index
When scanning a secondary index, we actually track each tuple in the transaction manager twice - as a part of the interval read from the secondary index and as a point in the primary index when retrieving the full tuple. This bloats the read set - instead of storing just one interval for a range request, we also store each tuple returned by it, which may count to thousands. There's no point in this extra tracking, because whenever we change a tuple in the primary index, we also update it in all secondary indexes. So let's remove it to save us some memory and cpu cycles. This is an alternative fix for #2534 It should also mitigate #3197
Showing
- src/box/vinyl.c 13 additions, 2 deletionssrc/box/vinyl.c
- src/box/vy_point_lookup.c 0 additions, 12 deletionssrc/box/vy_point_lookup.c
- src/box/vy_point_lookup.h 9 additions, 0 deletionssrc/box/vy_point_lookup.h
- test/vinyl/tx_gap_lock.result 54 additions, 0 deletionstest/vinyl/tx_gap_lock.result
- test/vinyl/tx_gap_lock.test.lua 19 additions, 0 deletionstest/vinyl/tx_gap_lock.test.lua
Loading
Please register or sign in to comment