Skip to content

Releases: CoreyKaylor/Lightning.NET

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

0.8.12

31 Jan 04:37
Compare
Choose a tag to compare
  • Implemented mdb_set_compare and mdb_set_dupsort
  • Implemented cursor operations: multiple put, get multiple, move next multiple
  • DatabaseOpenFlags.DuplicatesFixed now include DuplicatesSort by default
  • MoveNextDuplicate and MovePrevDuplicate now return only value
  • Actualised CursorPutOptions and PutOptions
  • Added missing to-bytes converters
  • API improvements and changes

0.8.8.52157

18 Jan 08:58
Compare
Choose a tag to compare
  • Added missing PutOptions
  • Added compact option to LightningEnvironment.CopyTo

0.8.7.52133

18 Jan 08:35
Compare
Choose a tag to compare
  • Fixed concurrency issues with CursorManager & TransactionManager
  • Added missing environment open flags
  • Fixed LightningEnvironment.UsedSize calculation logic