Commit graph

631 commits

Author SHA1 Message Date
Howard Chu
83dc42c5ca ITS#9037 mdb_page_search: fix error code when DBI record is missing
Use the more relevant MDB_BAD_DBI instead of MDB_NOTFOUND error code
2024-03-26 14:52:42 +00:00
Howard Chu
4a19b804cf ITS#9378 Add explicit replay logging
Logs essential ops so they can be replayed.
Ignores read ops for now.
2024-01-09 17:27:59 +00:00
Howard Chu
ce200dca1d ITS#10095 partial revert of ITS#9278 2fd44e3251
The patch was incorrect and introduced numerous race conditions.
The original problem was a FreeBSD bug, subsequently fixed:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269277
2023-08-27 15:40:34 +01:00
Howard Chu
76bad923f7 ITS#8447 fix cursor_put(MDB_CURRENT) on DUPSORT DB with different-sized data 2023-05-25 19:33:44 +00:00
Howard Chu
54fae7711f ITS#9961 LMDB: fix MSVC error 2022-12-15 09:38:45 +00:00
Howard Chu
139831a5c0 ITS#9916 liblmdb: use alternate MDB_page2 struct for some accesses
fakepage pointers are only guaranteed to be 2-byte aligned. Use a
2-byte aligned struct definition when referencing 2-byte page members
if a page pointer possibly points to a fakepage.
2022-11-28 23:18:56 +00:00
Howard Chu
d2fa5806d8 ITS#9806 LMDB page_split: key threshold depends on page size
32 was chosen for page size of 4KB. Not large nough for 16KB pages.
2022-11-28 14:32:33 +00:00
Mike Hommey
abe36745d2 ITS#9919 - Mark infrequently used functions as cold rather than manually putting them in a separate section 2022-09-27 17:30:48 +01:00
Mike Hommey
4bb20ed082 ITS#9030 - Use sys/cachectl.h rather than asm/cachectl.h on mips
It also contains the cacheflush function declaration.
2022-09-23 02:39:27 +01:00
moneromooo-monero
8a76450336 lmdb: catch non-LMDB negative errors before strerror
That should hopefully shut coverity up
2022-08-22 18:51:32 +00:00
Howard Chu
c4085fdfe6 ITS#9723 clear C_EOF on cursor with MDB_FIRST_DUP 2021-10-26 16:40:38 +01:00
Howard Chu
b167701f86 ITS#9500 fix regression from ITS#8662 2021-03-14 17:51:52 +00:00
Howard Chu
f8891d510b ITS#9376 simplify 2021-03-14 17:51:38 +00:00
Quanah Gibson-Mount
56609fb5a6 ITS#9469 - Typo fixes 2021-02-18 20:32:28 +00:00
Howard Chu
f9c5b46651 ITS#9461 fix typo 2021-02-11 11:34:57 +00:00
Howard Chu
40585b4839 ITS#9461 refix ITS#9376
Was setting C_DEL flag gratuitously
2021-02-09 23:41:11 +00:00
Howard Chu
7796aaebcd ITS#8662 Add -a append option to mdb_load
To allow reloading of custom-sorted DBs from mdb_dump
2021-01-28 18:26:41 +00:00
Quanah Gibson-Mount
b4e1e00e9e Happy New Year! 2021-01-11 19:21:58 +00:00
Howard Chu
c131c853f0 ITS#9376 Fixes for repeated deletes with xcursor
On DUPSORT DBs, must initialize xcursor regardless of whether
caller requested its data. Also in cursor_prev must check whether
cursor index is still within range before using it.
2020-10-23 20:37:30 +01:00
Howard Chu
f681a07634 Silence stupid fallthru warning 2020-06-16 19:57:41 +01:00
Howard Chu
f683ffdc81 ITS#9278 fix robust mutex cleanup for FreeBSD
FreeBSD 11 supports robust process-shared POSIX mutexes,
but requires them to be explicitly destroyed before munmap
2020-06-16 19:56:16 +01:00
Howard Chu
87a94cbf9b ITS#9155 lmdb: free mt_spill_pgs in non-nested txn on end 2020-01-23 14:52:13 +00:00
Quanah Gibson-Mount
ed0b29b3fe Happy New Year! 2020-01-09 16:46:43 +00:00
Quanah Gibson-Mount
8bf3fdcd6d ITS#9118 - Fix typo in prev commit 2019-11-22 14:36:38 +00:00
Howard Chu
34f572e7a5 ITS#9118 add MAP_NOSYNC for FreeBSD 2019-11-21 20:44:37 +00:00
Kris Zyp
8d93fe0718 ITS#9007 don't free loose writemap pages
Broken in ITS#8756
2019-04-16 10:35:04 +01:00
Kris Zyp
ea30be6109 ITS#8975 WIN32: Skip setting file pointer for write maps
CreateFileMapping already takes care of it.
2019-02-10 10:11:53 +00:00
Howard Chu
7375ffc0d4 ITS#8969 tweak mdb_page_split
Bump up number of keys for which we use fine-grained splitpoint search
2019-01-31 00:22:28 +00:00
Howard Chu
b15149a56b Happy New Year 2019-01-14 19:06:40 +00:00
Howard Chu
1f33a6d910 ITS#8756 remove loose pg from dirty list in freelist_save 2018-09-10 16:20:07 +01:00
Howard Chu
3b01bbbc67 ITS#8844 use getpid() in mdb_env_close0() 2018-05-02 17:06:15 +01:00
Quanah Gibson-Mount
385193cd52 Happy New Year 2018-03-22 15:22:03 +00:00
Howard Chu
e77918a903 ITS#8819 can't use fakepage mp_ptrs directly 2018-03-21 22:48:04 +00:00
Hallvard Furuseth
f6514da360 Tweak ITS#8722 fix: Use XCURSOR_REFRESH()
This checks XCURSOR_INITED() and fixes the mn_flags check.
2018-02-11 20:59:44 +00:00
Hallvard Furuseth
40daa8e73f XCURSOR_REFRESH() fixups/cleanup
* Check NUMKEYS(), similar to f34b61f947
  "ITS#8722 fix FIRST_DUP/LAST_DUP cursor bounds check".
* Move XCURSOR_INITED() into XCURSOR_REFRESH().  This adds a check in
  mdb_cursor_put, below /* converted, write the original data first */.
* Factor mc_ki[] out to XCURSOR_REFRESH().
* Replace an mc_pg[] with mp which is equal (mdb_cursor_del0).
2018-02-11 20:59:37 +00:00
Howard Chu
98b2910ee8 ITS#8722 fix FIRST_DUP/LAST_DUP cursor bounds check 2018-02-11 20:59:28 +00:00
Howard Chu
35251f6847 ITS#8699 more for cursor_del ITS#8622
Set C_DEL flag on reinit'd subcursor
2018-02-11 20:57:50 +00:00
Howard Chu
a4d9a75a1e ITS#8760 fix regression in 0.9.19 2018-02-09 18:46:40 +00:00
Quanah Gibson-Mount
b2426af3d1 ITS#8612 Fix Solaris builds with liblmdb
This patch fixes liblmdb builds on Solaris and derivatives by defining
_POSIX_PTHREAD_SEMANTICS
2018-02-09 18:45:37 +00:00
Howard Chu
8b780915d9 ITS#8622 fix xcursor after cursor_del
Re-fix 6b1df0e4c7 from ITS#8406
2017-03-23 21:11:07 +00:00
Howard Chu
a87c8fd8c9 Further fix f8ce8a8271
Fully revert the change to GET_MULTIPLE
2017-01-14 19:23:22 +00:00
Howard Chu
6a1ee5feec Fix f8ce8a8271
GET_MULTIPLE was broken
2017-01-12 13:36:12 +00:00
Howard Chu
aa5c04aba8 Happy New Year 2017-01-11 16:18:03 +00:00
Howard Chu
ab18b27d7b Tweak cursor_next C_EOF check
Allow C_EOF flag to be stale
2017-01-11 11:22:26 +00:00
Howard Chu
c97f4ed1ae ITS#8557 fix mdb_cursor_last
Optimize mdb_page_search_root(PS_LAST) when cursor is already near
last position, ignoring C_EOF flag for now.
2017-01-11 11:21:34 +00:00
Howard Chu
74d64d0eb2 ITS#8554 kFreeBSD is like BSD
Doesn't have POSIX robust mutexes - GNU userland on BSD kernel
2016-12-28 18:32:14 +00:00
Hallvard Furuseth
9db2b6e128 More MDB_node doc 2016-12-21 21:51:43 +01:00
Hallvard Furuseth
a4976c12e5 Doxygen fixes. Use DISTRIBUTE_GROUP_DOC.
- DISTRIBUTE_GROUP_DOC makes doxygen give several fields the
  same doc: mn_hi + mn_lo in MDB_node.
- With mdb_mutex_t + mdb_mutexref_t, instead split them up.
2016-12-21 21:51:09 +01:00
Hallvard Furuseth
bb08f63833 ITS#8504 Fix prev commit: mc_error, #ifdef SIGPIPE
Never clear mc_error, we could lose a failure in the other thread.
2016-12-15 22:27:33 +01:00
Lorenz Bauer
894e88bf89 ITS#8504 mdb_env_copyfd2(): Don't abort on SIGPIPE
Return EPIPE instead.
2016-12-15 22:27:33 +01:00