Commit graph

23 commits

Author SHA1 Message Date
1a9a9afa99 Version bump v0.3.5.
FossilOrigin-Name: b0993da5986bf79ea84f035f8eacdc59574b2658d91d8d302e973e8f6a6059f9
2024-03-25 02:03:07 +00:00
b7ce0bbaab Update for release.
FossilOrigin-Name: d1c8150ca567c143a4a7959d10f86300df22fa0cd3886af80b5aca3400f7f339
2022-12-22 00:45:18 +00:00
442d19ecb5 Minor updates for Ruby 3.x.
FossilOrigin-Name: 792a95e73dbfb858dbbd56b1140c2ddf6bc3afb558e65cc665f30fd6db6833e1
2022-08-08 23:02:59 +00:00
9947f75cf0 Bugfix: strlcpy stops on NUL, which can corrupt Marshalled data.
Bump version for release.

FossilOrigin-Name: daca241b41947101f697a0a82dc86b34ccd6d7c230ca004bc47d58c8f0c485b7
2021-10-22 19:59:46 +00:00
25655d0554 Move de/serialization to ruby for easier error detection.
Closes open transactions if de/serialization fails for any reason,
avoiding the object to be in a potentially confused state.

Thanks to Michael Granger (ged@faeriemud.org) for the heads up and test case.

FossilOrigin-Name: e6e52675510533da8a26b0e2f0b2f73505a3b4ee0c94b123c37089489ed7745a
2021-10-06 20:43:13 +00:00
6cc96d8fae Add Loggability for nicer debugging output.
FossilOrigin-Name: ff761d0e8e8638b1f4d98d8d913d99591d83da0167d75b28f1bd186e1907ee47
2021-10-06 17:25:50 +00:00
56d17ba8e8 History and version updates for release.
FossilOrigin-Name: 3e85a0bcafa199efe0dfff0e538593801162168b1c1a41942acd7be7f66d9616
2021-07-14 00:55:15 +00:00
e9b476a4d7 Multiple changes.
- Raise an error if invalid options are passed to the constructor.
- Bugfix: Ensure drop() only removes the specified collection.
- Fix initializer double memory allocation.
- Fix key/data object allocation: make garbage collection safe.
- Move common macros to the global header file.

FossilOrigin-Name: 98d3016bd25921dead39d9c5474712766b56519d575bc8cd960932b3fbc16b69
2021-06-28 23:39:46 +00:00
ca34f9fdc5 Multiple changes.
- Alter the behavior of #clear, so it doesn't destroy collection
   environments, but just empties them.
 - Add #drop, which explictly -does- destroy a collection environment.
 - Run all cursor methods through rb_protect, to ensure proper
   cursor cleanup in the event of an exception mid iteration.
 - Fix the block form of collections to support multiple scopes.
 - Switching to a collection now automatically creates its environment.
 - Add include? and has_key?, for presence checks without allocating
   value memory or requiring deserialization.

FossilOrigin-Name: e1ed7bf613981607bb3b57ce7dd3e58b94ea3046e140b6dc37440da8d2909f94
2021-04-08 22:27:47 +00:00
3a3adea681 Update to v0.2.1.
FossilOrigin-Name: 9e5a9243d16f72bb1bf205b0e863537ef75d29de31d7171ceee1b13aa5ba5625
2021-04-06 15:43:28 +00:00
f9f8b427ba Update for release.
FossilOrigin-Name: 155e7377d02d37ce06b0302e92092be5e7931cb782532a62a9ebedf8a23704be
2021-03-20 01:14:50 +00:00
00036862df Move utility conditional transactions to a helper wrapper.
FossilOrigin-Name: ae7078a55b83a71f41a6e5d076a6a5ad1483aafac10be5d77afcd4a537a6f663
2021-03-15 07:39:01 +00:00
54a9409066 Don't inadvertantly close an open transaction while using hash convenience methods.
FossilOrigin-Name: 6454408d0a2347681d8030e1788f94904aa69e7502ba695f099d964a638b8d49
2021-03-15 06:52:44 +00:00
07cda417c8 Bump version and cleanup for release.
FossilOrigin-Name: 5f0e4ea2518c222d3052ffd46f8b5a3a94c7139bce9bf47895a8ca0d632c9507
2021-03-14 23:30:09 +00:00
c0cd35e260 Multiple changes.
- Complete first round of documentation.
  - Complete first round of tests and coverage.
  - Expand the thread benchmarker for testing metasync.
  - Add enumerators (each_key/each_value/each_pair) using cursors.
  - Remove keys() implementation in favor of using the emumerable.
  - Make deserialization more DRY.
  - Add an efficient length() method.
  - Add various Hash-alike methods.
  - General code cleanup for release.

FossilOrigin-Name: 0d2bd3995f203c9ac1734ac3da32dd2f09efda9a394e554e6006e44dd07a33b0
2021-03-14 23:19:41 +00:00
a54c286a75 Start blocking out some documentation.
- Fix some C rdoc so it is parsed correctly.
  - Fill out transaction testing.
  - Populate docs for DB options.

FossilOrigin-Name: f54dbfacf2dda100a116fdcc856ca5231e249f23238ca9d4355618e3a380a8f8
2021-02-14 09:47:04 +00:00
81ee69295c Checkpoint.
- Fix a couple of edge cases while switching between collections.
  - Raise error if attempting to switch collections mid-transaction.
  - Add logic for re-entrancy with long-running transactions.
  - Revert to the prior collection if passing a block to #collection.
  - Add a predicate to tell if you're currently within a long-running transaction.
  - Add separate commit/rollback to long-running transactions.

FossilOrigin-Name: 711239e6fc2f25479a26fb54805da1e5db792f97f28a8b5724e0b38eb11cdb07
2021-01-25 00:36:40 +00:00
ceb92fad16 Expose some mdbx statistics/metadata to ruby.
- Add anonymous structs for settings and state to the internal db
    instance struct.
  - Allow tweaking the max_readers setting on db open.
  - Allow altering database sizing/geometry values.
  - Start sketching out some transaction re-entrancy.
  - Refactor initialization slightly, just use the db struct
    instead of additional unnecessary vars.

FossilOrigin-Name: 513f02946f7dc39001c402c1adf0697bb2852ba867685b35adbccaaaf43c6e15
2020-12-23 01:10:19 +00:00
770a931d77 Multiple changes.
- Add build manifests for SourceHut.
  - Update README destination links.
  - Fix manifest for prerelease gem.
  - Reopen env handles when #clear is successful.
  - Fix #each when there is only one key.
  - Always use io_vec lengths when creating new strings.
  - Hook for rdoc generation.
  - Rename #open to #reopen, don't alias it.
  - Add a Rollback exception for upcoming transaction block work

FossilOrigin-Name: d6ddedc51b0ac67f395d5749aa3e6adbeebdaf2843c6402ace757b0afffc2be9
2020-12-22 06:24:18 +00:00
5ed44e52fa Multiple changes.
- Provide a method to reopen the database environment if closed.
 - Add #keys, which returns an array of keys for the current collection.
 - Finish collection/namespace implementation.
 - Add various aliases (collection->namespace, etc)
 - Add #clear, which destroys data for a the current collection.
   If called in the main db, destroys all.  Don't close the environment
   after a #clear, just the dbi handle.
 - Various bugfixes.

FossilOrigin-Name: 8b00d59e8c5269266f3c6c0d10056a1c0fe1bb583ffbe099a6ed0dac3baf3a66
2020-12-17 01:09:43 +00:00
d92ba7c5eb Checkpoint commit.
Fleshing out collections, automatic serialization of values.  Stringify
all keys.

FossilOrigin-Name: 8bb5e27eacd18bc34b60309a03cdce31921f790c821dab89bf12cd9bfc19825d
2020-12-16 08:29:50 +00:00
37b8091690 Checkpoint commit, start sketching out MDBX::Database.
FossilOrigin-Name: 92f55b2d6cc9652cb9cb67e69588ed0f4f155086a5a160aae68a1f22e9114314
2020-11-30 05:57:26 +00:00
mahlon@laika.com
6a7bfb722f Initial layout/commit.
FossilOrigin-Name: 5ccedce83232d9c4f5341866293f884fde8bcc9c1df2ea7407740d2d984fae9b
2020-11-19 02:06:45 +00:00