Commit Graph

2760 Commits

Author SHA1 Message Date
Leo Yuriev
f943bbf91c mdbx: more for ASAN.
Change-Id: I2bd0573cfe4c7822fa8f3cf94db60b684964a40d
2016-05-19 22:05:46 +03:00
Howard Chu
856f30b52c mdbx: backport - ITS#8424 init cursor in mdb_env_cwalk.
Change-Id: I979b6f492c56d1c61ce233727ff058df48f327d1
2016-05-16 17:46:45 +03:00
Leo Yuriev
e84b420227 mdbx: minor (cleanup non-ascii).
Change-Id: I46dc4f4fb3c984210d65fa31af65f570a98f4813
2016-05-10 16:47:17 +03:00
Leo Yuriev
09d7904317 mdbx: clarify ov-pages copying in cursor_put().
Change-Id: I48ae57579a7d68178ec1857785ffdd6f0c0f7e13
2016-05-10 13:21:38 +03:00
Hallvard Furuseth
1ef0106b51 mdbx: backport - Comment ovpage code in mdb_cursor_put().
Change-Id: I6b3bff87dc49135fdda3e9ce0a505822ab26d3d5
2016-05-10 13:15:05 +03:00
Leo Yuriev
f1acaf72ca mdbx: Merge branch 'master' into nexenta. 2016-05-09 22:50:27 +03:00
Leo Yuriev
6191b46ca1 mdbx: Merge branch 'devel'. 2016-05-09 08:36:48 +03:00
Leo Yuriev
7c3c28239c mdbx: more likely/unlikely for mdb_node_add.
Change-Id: I1f241c6cea55db6fed744ba9f6f5733f6622015f
2016-05-08 02:29:59 +03:00
Leo Yuriev
4d3e349c16 mdbx: don't memcpy when src eq dest.
Workaround for 'destination overlaps source' from Valgrind.

Change-Id: Ib12eacbd224057334311816346ea0ccece2b42cf
2016-05-07 23:44:41 +03:00
Leo Yuriev
8791e3243f mdbx: workaround for pthread_setspecific's memleak.
Change-Id: I8b48548a40bb2fe58db14b8f6944f5a3802ffbb9
2016-05-07 15:21:59 +03:00
Leo Yuriev
14b3afdcff mdbx: notify OOM-handler about end of loop.
Change-Id: I71d66e371df869560801e12b8b06c4f4cbf90e98
2016-05-07 03:52:04 +03:00
Leo Yuriev
bfc6900b07 mdbx: reporting 'Free pages' -> 'Unallocated'.
Change-Id: I31ef11250139e3ec97240610b40b5f0ec7deaa6c
2016-05-07 03:22:42 +03:00
Leo Yuriev
bbf8a047fc mdbx: release 0.9.19
re-release v0.9.19 with a few commits,
that were missed previously.

Change-Id: Ia22eb6c3fd35c80596705326ae46f167c8cc3d73
2016-05-06 05:22:56 +03:00
Leo Yuriev
c7ff2fbb9a mdbx: Merge branch 'devel'. 2016-05-06 05:20:06 +03:00
Leo Yuriev
f70d6638c5 mdbx: MDBX_ALLOC_KICK for freelist backlog.
Tries to sync only when all pages was allocated,
but not every time reclaiming had stopped at weak checkpoint.

Change-Id: I0b41fd87f1eab4725379a17fc29e16820122467d
2016-05-06 04:53:14 +03:00
Leo Yuriev
65354dcd01 mdbx: lifo-reclaimig for weak-to-steady conversion.
Change-Id: Id078c434cf3a624331c53f6b38ce34e31dc65aa5
2016-05-06 04:50:51 +03:00
Leo Yuriev
f335c13b45 mdbx: clarify mdbx_oomkick() for LMDB-mode.
Change-Id: I6e38a1e2892084f8a5f98af7f947c1c9d2f18b9c
2016-05-06 04:13:29 +03:00
Philipp Storz
cdd7eadce7 mdbx: be a bit more precise that mdb_get retrieves data (ITS#8386).
Change-Id: I91f6fa0cf7c98ed113ff8d51387376a1c18dc231
2016-05-06 02:58:19 +03:00
Leo Yuriev
cea2e33d05 mdbx: minor fix yota's tests.
Change-Id: Id10afffa11b01b849e6e42b12f8396e29e1ae484
2016-05-06 02:58:19 +03:00
Leo Yuriev
cd14429b5d mdbx: Merge branch 'master' into nexenta. 2016-05-04 23:09:01 +03:00
Leo Yuriev
ba3bd76a22 mdbx: sync CHANGES with LMDB-0.9.19.
Change-Id: I0e185caab97598215299fee6bb449bc4c41671a0
2016-05-04 22:31:58 +03:00
Leo Yuriev
599069b2c4 mdbx: remove needless assert.
Change-Id: I0129a9e2cd8bda4c541d8b610bcf3f887ddcb75b
2016-05-04 22:31:58 +03:00
Leo Yuriev
2dd9638321 mdbx: refine find_oldest() and oom_kick().
Change-Id: I758eba1a93550b687bbec6bf90e5b2d48090af25
2016-05-04 22:31:58 +03:00
Leo Yuriev
50f5475185 mdbx: don't mimics the MDBX's features for MDB.
Change-Id: Ie3865434c741da77b9a285e43b7d6a1d9ec0c5e2
2016-05-04 22:30:11 +03:00
Leo Yuriev
0a65b26c58 mdbx: Merge branch 'master' into nexenta. 2016-04-28 08:21:43 +03:00
Leo Yuriev
3294da86d7 mdbx: fix typo for clang.
Change-Id: I6973be51cbe04dba0dd993eec9dcfd641919eb83
2016-04-28 08:20:04 +03:00
Leo Yuriev
535dd9eb8c mdbx: reporting 'reading' -> 'detaited'.
Change-Id: I0a88e1b27458e2aba7d6f5249ed779af3dda3a0f
2016-04-27 20:06:26 +03:00
Leo Yuriev
2eccf4140d mdbx: minor refine makefile (most for 'bench' target).
Change-Id: Ic59fc705e430ba6aa5771bc50d3e2bf62e43ae08
2016-04-27 17:49:41 +03:00
Leo Yuriev
78e6bf5e36 mdbx: refine/speedup mdb_cmp_memn().
Change-Id: I2c62246b26485039f29bc400a4d42f05270a7398
2016-04-27 16:08:08 +03:00
Leo Yuriev
477932e2b3 mdbx: MADV_REMOVE for unallocated space.
Change-Id: I14db843cf6e0dc713e2f302dc5ad86dc405c8d62
2016-04-27 01:52:52 +03:00
Leo Yuriev
745bdd346a mdbx: extra backlog's page for MDB_LIFORECLAIM.
Change-Id: I24d656de96a4bc3a3d4f6409db75868b818a4233
2016-04-26 22:48:08 +03:00
Howard Chu
7ae6c0f768 mdbx: backport - ITS#8412 fix NEXT_DUP after cursor_del.
Change-Id: If0bc63a9d398ae440a7a9ab7f0502b9c9608640e
2016-04-26 15:19:26 +03:00
Leo Yuriev
f57a54a301 mdbx: fix mtest1 for backlog-autosync.
After the ae324984cb steady
checkpoint(s) could be created automatically while reserve a
pages for deletion from freeDB.

In other words, some (beginning of list) of modify-ops were
"unexpectedly" synced to disk, despite of the no-sync closing
of DB by the mtest1 - therefore testcase could fail.

Now required rollback at least one of transactions after the
last explicit sync, but not all of ones.

Change-Id: I6ca6dba8a62a30f12f370fa91325efdf4fe35772
2016-04-25 21:02:11 +03:00
Leo Yuriev
bfd82b5830 mdbx: refine mdb_env_sync0().
Change-Id: If27986d02b2ca19ba547fe8fa5c8f4a8b9019900
2016-04-20 19:51:29 +03:00
Howard Chu
78f1fbd038 mdbx: backport - ITS#8406 fix xcursors after cursor_del.
Don't leave them uninit'd if they now point at a valid DUP node

Change-Id: Idccf9540686816e3d06e404c9a5bef1bce059bfc
2016-04-20 19:44:01 +03:00
Leo Yuriev
ae324984cb mdbx: rework backlog for freeDB deletion.
Change-Id: Ib535233313e8ddd21c35df46c03e5e298f3587e6
2016-04-20 19:44:01 +03:00
Leo Yuriev
90aa4b154a mdbx: refine mdbx_cmp2int().
Change-Id: I5497db2e88d764e18a1aae1809dc66fd62a5adbe
2016-04-19 11:59:36 +03:00
Leo Yuriev
026a566fc6 mdbx: minor refine madvise order.
Change-Id: Ia6b78cad2aae68f5cb4c8475fbd27f9a9cb44cf2
2016-04-19 11:59:36 +03:00
Leo Yuriev
80e660317f mdbx: prohibit MDB_LIFORECLAIM with just MDB_NOMETASYNC.
Change-Id: Ib605174bf75c473aaf42b9aa9011db29343e4484
2016-04-19 11:59:36 +03:00
Leo Yuriev
3a8db9fed3 mdbx: -Wextra and fixes.
Change-Id: I9f373e66f8f5f7cf3b29b5246eb2c67e4a49a460
2016-04-19 11:59:36 +03:00
Leo Yuriev
9871e24670 mdbx: refine 'bench' make target.
Change-Id: Ib0594f45ee4b4eedfd18b60483d104913321585e
2016-04-19 11:59:35 +03:00
Leo Yuriev
ef35aae2fe mdbx: minor refine def of cold/hot attributes.
Change-Id: I7ec80dde8b88885d7fb2ce5dbccb3726c4fe62f5
2016-04-19 11:59:35 +03:00
Leo Yuriev
1b780162dc mdbx: minor spaces/tabs.
Change-Id: I9f2c42347ad25ac179bc690d403f02721a6c37ca
2016-04-19 11:59:35 +03:00
Leo Yuriev
bf7f3814f9 mdbx: minor fix non-ascii comment.
Change-Id: Ie9a38e2bef3c8ef91adc3f45818096658c84cd34
2016-04-19 11:59:35 +03:00
Leo Yuriev
46b8915087 mdbx: rework attributes.
Change-Id: Id9d436a54ac14ed82c593710b1d5939871c89d1a
2016-04-13 13:40:35 +03:00
Leo Yuriev
ce06c8df9e mdbx: 'attributes' support for Nexenta.
Change-Id: Ib7a33d6a489d3ef6cfe67349c1ae8946a6a0548a
2016-04-13 13:40:35 +03:00
Howard Chu
ebf1ae1bdc mdbx: backport - mdb_drop optimization.
If we know there are no sub-DBs and no overflow pages, skip leaf scan.

Change-Id: I3005aaf0f80821f87d8a88c435fda1a52ee0557a
2016-04-13 13:26:26 +03:00
Leo Yuriev
828a5d73ca mdbx: always copy the rest of page (MDB_RESERVE case).
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.
2016-04-13 13:12:47 +03:00
Leo Yuriev
c17cff1d4e check MDB_RESERVE against MDB_DUPSORT.
Change-Id: I7459a92ecea867a5fd6510c828ff65cd551a1e9a
2016-03-30 02:32:59 +03:00
Leo Yuriev
b59f25fd46 mdbx: minor format spaces/tabs.
Change-Id: Ic9cce2e7a2552fb062ab8709121c72a9131be8b6
2016-03-30 02:32:50 +03:00