vmware / splinterdb

High Performance Embedded Key-Value Store
https://splinterdb.org
Apache License 2.0
680 stars 57 forks source link

(#537) Add unit-tests to exercise rc/allocator.c; Other minor cleanup. #540

Closed gapisback closed 1 year ago

gapisback commented 1 year ago

This commit refactors and does some minor cleanup of code in allocator.{h,c} and couple of related files. Some page / extent number / offset boolean and conversion macros are added, along with unit-tests. No significant change in code-logic is being introduced with this fix.


No major code / logic changes. Introduced a new unit-test to exercise interfaces in allocator.c and rc_allocator.c (indirectly), along with additions of minor interfaces to manipulate page / extent addresses / validity etc.

netlify[bot] commented 1 year ago

Deploy Preview for splinterdb canceled.

Name Link
Latest commit 072e8978228654e41f2ab7a46b70d30576ce90c0
Latest deploy log https://app.netlify.com/sites/splinterdb/deploys/641111a16d384d00088d147f
gapisback commented 1 year ago

Discussed in the weekly PR meeting with @rtjohnso and @ajhconway .

The overall ideas that this PR, and its associated PR #538, were bringing-in, that is of looking at page / extent addresses as page number, extent ID, was not considered very useful. There was no conviction that adding unit-tests to exercise, say, the mini-allocator, to demonstrate how we walk through individual pages in an extent wasn't found to be too useful to merit integrating these changes to /main.

Withdrawn.