-
Type: Build Failure
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
recovery-stress-test failed on Ubuntu 18.04 Stress tests
Host: ec2-54-152-7-204.compute-1.amazonaws.com
Project: WiredTiger (develop)
Commit: diff: WT-5470 Reduce copies and allocations in read path (#5556)
This commit is to refactor __wt_txn_read and its surrounding functions to avoid unnecessary allocations and copying.
Before:
The interface returns pointers to WT_UPDATE via an output parameter of type WT_UPDATE **. The pointer either gets set to an update in the update list or an update gets allocated with the WT_UPDATE_RESTORED_FROM_DISK flag set. We signal absence of value by allocating a tombstone. As part of modify and history store processing, we do separate allocations to create the buffer that the update itself is pointing at (this is separate from the allocation of the actual update itself). This update's contents are then copied over to the cursor buffer if it was allocated separately.
After:
I've created a new type called WT_UPDATE_VALUE which belongs to the WT_CURSOR_BTREE. The value contains a buffer as well as some information about the update that we need in the upper layers. The value's buffer will either be pointing at an update's data from the update list or it will be pointing at its own memory (reconstructed modifies, history store values, onpage value, etc). We signal an absence of value by not assigning the type and leaving it as its invalid zero'd state WT_UPDATE_TYPE_INVALID. As part of modify and history store processing, we still potentially do an allocation to extend the update value's buffer, however, we reuse the buffer's memory so this becomes less likely. Lastly, the view already has a buffer so if it owns memory, it simply lets the cursor point its value buffer at it instead of memcpying the contents across from an artificially created update structure. | 01 May 20 03:25 UTC
Evergreen Subscription: ; Evergreen Event:
- is related to
-
WT-6093 Fix and reenable test_random_abort in recovery-stress-test
- Closed