Change-Id: Iebc406767bee98a85ab6efec887ed698ffe59066
> On 30. mars 2016 19:25, Леонид Юрьев wrote:
>
> Why mdb_cursor_put() doesn't copy the rest of page in case MDB_RESERVE?
>
> In other words - why we should copy or not copy an end of page in
> dependence from MDB_RESERVE?
2016-03-30 19:46 GMT+03:00 Howard Chu <hyc@symas.com>:
That logic is backwards because I was preserving existing behavior,
i.e. make the page - including unused portions - look the same with
put() in the child txn as put() in the parent. So with MDB_RESERVE
the entire page must be copied in case the user peeks at it before
writing to it. Without MDB_RESERVE, the initial part of the page
body need not be copied since LMDB is about to overwrite it.
I'll comment that, unless that code should just go away. Don't know
if this is the best behavior or it was just easier to code it than
to decide whether to cater to such obscure user behavior. But
people do come up with special things do do about overflow pages.
Let "illegal" branch pages thru on the FreeDB - the condition
is only temporary and will be fixed by the time rebalance finishes.
Change-Id: I5d34fd96096f88638db55166aba7194dcef7e429
Avoid read txn-flags from shared write TXN (e.g. env->me_tnx0->mt_flags)
without holding a write-mutex.
Change-Id: I3a3a64597f69b7df205043c567a51fe509247826
Includes:
- ITS#8321 deinit empty cursors
Always unset C_INIT flag if the cursor's target DB has been deleted
- ITS#8321 Fix mdb_cursor_set
Always reinit mc_pg[0] if cursor is not C_INITIALIZED
It might have a stale value when using nested txns
- ITS#8321 mdb_put cursor needs tracking too
- ITS#8321 page_touch - don't fixup the cursor we just touched
- ITS#8321 More cursor fixup
Based on page_touch fixup from ITS#7594 but expanded:
make sure sub-cursors agree with main cursors.
- ITS#8321 cleanup unused var
Change-Id: I4b825e20e9d42d3166052e9b3e5bd0ac33b70e85
ITS#8321 fix ambiguity in cursor_put fixup
After delete/add of a node, other nodes may no longer be
pointing at the data they intended. This can confuse subsequent
fixups.
Change-Id: Id43406a9828b440735835b024e94e9b2d5a17693
Multiple bugs were fixed in the cursor fixups which
adjust other open cursors in response to various write ops.
Includes:
- ITS#8321 Fix del/dupsort.
When deleting a dupsort key, if other cursors pointed at that key,
set them to uninit'd, not EOF. They no longer have anything to
point at.
- ITS#8321 don't skip fixups on splitting cursors.
Adjustments can't be skipped, in recursive calls each level must
fixup their own level.
- ITS#8321 fix mdb_cursor_chk().
It was reporting spurious errors due to uninit'd cursors
- ITS#8321 fix mdb_cursor_shadow().
Set a valid txn so that cursor fixup code works on the shadows
- ITS#8321 fix mdb_cursor_put.
Ignore sub-cursors that shouldn't be fixed up
- ITS#8321 track temporary cursors.
In rebalance/split operations, temporary cursors need to be visible
to propagate fixups
- ITS#8321 simplify page_split fixups.
- ITS#8321 reorganize page_split fixups.
DUPFIXED fixups needed to occur after separator update.
MDB_RESERVE handling moved after split fixup.
Change-Id: I0c04acf54ebf6e84f32996b5723ec6fafb983ad9