erthink / libmdbx

One of the fastest embeddable key-value ACID database without WAL. libmdbx surpasses the legendary LMDB in terms of reliability, features and performance.
https://erthink.github.io/libmdbx/
Other
1.16k stars 111 forks source link

Enhance mdbx_env_stat_ex to return stats whole DB (now returns stats of Main DBI) #190

Closed AskAlexSharov closed 3 years ago

erthink commented 3 years ago

Oh, I remember the whole story.

The main problem is that the legacy API (with which you need to maintain compatibility, because it is used somewhere) did not use a transaction, i.e. the mdbx_env_stat() does not accepts a transaction in the parameters. Therefore, it is only possible to get the snapshot information from a meta pages, but not to total across all the subDB(s).

It's time to think about how to fix it.

hiqsociety commented 3 years ago

"Break compatibility" and make it mdbx_env_stat_all(txn)?

erthink commented 3 years ago

Please check this fix in your use cases.

AskAlexSharov commented 3 years ago

looks good to me

AskAlexSharov commented 3 years ago

@hiqsociety released https://github.com/torquem-ch/mdbx-go/releases/tag/v0.10.2