intelligentplant / AppStoreConnect.Adapters

Allows Intelligent Plant App Store Connect to query 3rd party systems
https://appstore.intelligentplant.com
MIT License
0 stars 0 forks source link

FASTER key/value store memory pinning and clean-up improvements #366

Closed wazzamatazz closed 8 months ago

wazzamatazz commented 8 months ago

As suggested here, GCHandle.Alloc can be used to pin the key and value bytes during an asynchronous FASTER upsert. This avoids the need to copy the bytes into a pinned Memory<byte> that was added in #362.

The commit also seals the FasterKeyValueStore class, removes the IDisposable implementation and simplifies the implementation of IAsyncDisposable.DisposeAsync. The IDisposable implementation has been removed because of the sync-over-async anti-pattern required to perform a final snapshot checkpoint when disposing of the store.