vinyl: force read view in iterator in autocommit mode
Every iteration over a secondary index tracks a point in the transaction manager (due to lookup in the primary index). As a result, if the user calls 'select' or 'pairs' over a huge data set, it will consume a lot of memory due to this tracked points, even if the user doesn't uses transactions. To mitigate this, let's send all read only transactions to read view immediately so that tracking is disabled completely during iteration. Note, with this patch select() called outside a transaction doesn't populate the cache any more, but it seems to be OK as caching large select() requests results in cache thrashing. Closes #2534
Showing
- src/box/vinyl.c 74 additions, 49 deletionssrc/box/vinyl.c
- src/box/vy_tx.c 6 additions, 6 deletionssrc/box/vy_tx.c
- src/box/vy_tx.h 9 additions, 8 deletionssrc/box/vy_tx.h
- test/engine/iterator.result 10 additions, 6 deletionstest/engine/iterator.result
- test/engine/iterator.test.lua 8 additions, 0 deletionstest/engine/iterator.test.lua
- test/vinyl/cache.result 12 additions, 10 deletionstest/vinyl/cache.result
- test/vinyl/cache.test.lua 7 additions, 5 deletionstest/vinyl/cache.test.lua
- test/vinyl/errinj.result 8 additions, 0 deletionstest/vinyl/errinj.result
- test/vinyl/errinj.test.lua 5 additions, 0 deletionstest/vinyl/errinj.test.lua
- test/vinyl/iterator.result 45 additions, 65 deletionstest/vinyl/iterator.result
- test/vinyl/partial_dump.result 16 additions, 1 deletiontest/vinyl/partial_dump.result
- test/vinyl/partial_dump.test.lua 12 additions, 1 deletiontest/vinyl/partial_dump.test.lua
- test/vinyl/tx_gap_lock.result 43 additions, 0 deletionstest/vinyl/tx_gap_lock.result
- test/vinyl/tx_gap_lock.test.lua 15 additions, 0 deletionstest/vinyl/tx_gap_lock.test.lua
Loading
Please register or sign in to comment