Skip to content

Releases: CoreyKaylor/Lightning.NET

More native lib additions, better comments, more tests

03 Mar 18:30
Compare
Choose a tag to compare

This release largely ensured there is better coverage with the native methods available in the LMDB available in this library.

  • Added overloads for Copy that include FileStream (file descriptor in the native lib)
  • Ability to set environment flags and get existing flags
  • A LOT more test coverage providing much better examples of different use-cases
  • Improved many of the XML doc comments throughout

Minor binaries fixes and stats addition

15 Jan 19:03
Compare
Choose a tag to compare
  • Database stats addition from @DecoyFish
  • Recompile native binaries to fix duplicate binaries issue in linux/arm targets
  • Updating target framework versions to remove netcoreapp3.1

LMDB 0.9.33 and remove event delegates 😯

27 Nov 23:05
Compare
Choose a tag to compare
  • Remove some debug code from compiled native binaries
  • Update LMDB native binaries to 0.9.33
  • Return key/value pairs in several missing cursor methods (related to older design modifications)
  • No longer support Windows auto-resize DLL. You can compile it yourself or grab the older binaries, but has been unsupported for a long time in the native project
  • Updated to net9.0 and language v13
  • BREAKING: Sorry, but I have done away with the convoluted internals using .NET event delegates to handle event, tx, child tx scenarios for you. If you were relying previously for this library to handle those for you, it will not require you to manage the correct order of things

Mobile binaries and fixes

11 Oct 20:27
Compare
Choose a tag to compare

Adds native binaries for Android and iOS targets.
Adds mdb_cursor_count from @adamfur
Fixes CopyTo swallowed error from @DecoyFish
Fixes string marshalling for paths in .NET 6 from @Sonix

net7.0 & C# 11 & LMDB 0.9.29

04 Feb 20:43
Compare
Choose a tag to compare
  • Updated all LMDB native binaries to 0.9.29 or equivalent commit from master for auto-grow on Windows
  • Added binary for osx-arm64
  • Fixed Windows x86 native binary when auto-grow is enabled
  • All binaries are produced deterministically with repository script now
  • Fixed spelling errors on TransactionState (breaking but simple)
  • Simplified targets file for .NET framework references
  • Added target for net7.0
  • Use LibraryImport over DllImport for net7.0
  • Fixed bug that closed cursor when it was already closed for us @4deeptech @sebastienros @AlgorithmsAreCool @pepelev
  • Fixed for net7.0 environment path now marshalling as UTF8
  • CI build simplified and now uses binaries in repo for all OS's for better coverage on binary script
  • Updated code-style for C# 11 and fixed many inconsistencies in code

.NET 6 and Auto-Resize on Windows Fix

04 Jan 22:04
Compare
Choose a tag to compare

Long overdue due to all the typical excuses (day jobs and all).

  • Adds target for .NET 6
  • Fix for auto-resize on startup via @valeriob

v0.14.0

06 Sep 13:01
Compare
Choose a tag to compare
  • Windows now supports auto-grow as an optional environment setting.
    • Works only on netcoreapp3.1 and net5.0
  • Linux binaries are now included in the published nuget package via @ubercellogeek
  • Fix for silent failure on AsEnumerable
  • Added XML doc comments to nuget package via @mralexes
  • Fix for arithmetic overflow via @pepelev
  • Optionally omit closing database handle via @adamfur

More Performance Improvements w/Span & Cursor redesign.

30 Jul 22:33
Compare
Choose a tag to compare

Performance Related Improvements

You can see the benchmarks here #125

  • MDBValue becomes more prominent in the API instead of an internal detail.
    • Exposes an AsSpan and a CopyToNewArray function.
    • AsSpan with a buffer pool can avoid any memory duplication and provides a 0-copy read
    • This is obviously a breaking change, but the changes to your application should be pretty straightforward
  • MDBResultCode is now returned on all signatures where the native counterpart returns a code
    • BREAKING!!! In your code this means that if you were previously relying on LightningException for control flow, your code will now need to adapt. I think in practice this has made the API easier to work with, but every situation might be different. There are now a set of extension methods ThrowOnError and ThrowOnReadError that provide the same behavior if you need it, but now you'll have to be explicit about it.

Cursor API redesign

  • LightningCursor previously took on a .NET api-centric role and there was some lossy translation due to this, in some cases some race conditions that would result in corrupted usage.
    • Now API is much closer to the native lib counterpart
    • There is now an AsEnumerable extension method as an alternative to the cursor itself being enumerable.
    • You can track the method name changes here 3528a88

Less notable changes

Some improvements were made to rework some of the tests and add some test coverage that was previously lacking. More can be done, but this is a good step forward.

We'll try to be a little more sensitive to breaking changes going forward and hopefully we're through the bulk of them.

Performance improvements w/Span API

06 Jul 22:14
Compare
Choose a tag to compare

Highlights

@AlgorithmsAreCool Added benchmarks for better visibility on performance #119
@AlgorithmsAreCool Introduced Span for much better native interop performance #122
Uses Github Actions and covers more OS variations
Updated native lmdb libs to 0.9.24

Upgrade instructions for those coming from pre-span changes.

MDBValue now makes itself more prominent in the public API. It exposes two new methods CopyToNewArray, and AsSpan. If you simply want older code to work and compile again, CopyToNewArray is what you're looking for. If you want to squeeze more performance, spend some time with AsSpan.

0.8.14

31 May 02:08
Compare
Choose a tag to compare
  • lmdb updated from master
  • Fixed CompareFunction being collected by GC