You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recent changes in #101 directly expose the lmdb::RoTransaction and lmdb::RwTransaction types instead of wrapping them in Reader and Writer types when calling Rkv.read() and Rkv.write().
This has the side-effect of also exposing the lmdb::Error type when calling R[o|w]Transaction.commit(), which was previously converted into a StoreError by the Reader.commit() and Writer.commit() functions.
And that's inconsistent with most of the other functions in the public API, including Environment.begin_r[o|w]_transaction() and the various Store::[Single|Multi|etc.]Store functions, which all wrap an lmdb::Error in a StoreError::LmdbError.
It's also obviously inconsistent with any other function that returns another type of StoreError, and it means that consumers of rkv need to handle both the StoreError type and the underlying lmdb::Error type.
We should ensure that the public API returns StoreError consistently to indicate failure.
The text was updated successfully, but these errors were encountered:
The recent changes in #101 directly expose the
lmdb::RoTransaction
andlmdb::RwTransaction
types instead of wrapping them inReader
andWriter
types when calling Rkv.read() and Rkv.write().This has the side-effect of also exposing the
lmdb::Error
type when callingR[o|w]Transaction.commit()
, which was previously converted into aStoreError
by theReader.commit()
andWriter.commit()
functions.And that's inconsistent with most of the other functions in the public API, including
Environment.begin_r[o|w]_transaction()
and the variousStore::[Single|Multi|etc.]Store
functions, which all wrap anlmdb::Error
in a StoreError::LmdbError.It's also obviously inconsistent with any other function that returns another type of StoreError, and it means that consumers of rkv need to handle both the StoreError type and the underlying lmdb::Error type.
We should ensure that the public API returns StoreError consistently to indicate failure.
The text was updated successfully, but these errors were encountered: