Skip to content

Conversation

@nickva
Copy link
Contributor

@nickva nickva commented Oct 6, 2025

Previously, in #5672 we incorrectly stored some of the properties.

The properties for the dbs db were stored correctly as ets:insert(mem3_opts, {db, opts}) while for the other dbs they were stored as ets:insert(mem3_opts, opts). All the requests would still work fine but the cache wouldn't be used as the values would be loaded from the db doc every time.

Fix the bug and also adjust the name of Opts variable, we're not storing props but opts so rename it to reflect reality and avoid confusion.

While at it, update the test suite to use the ?TDEF_FE macro and get rid of all the _test(begin ... end) boilerplate.

Previously, in #5672 we incorrectly
stored some of the properties.

The properties for the dbs db were stored correclty as `ets:insert(mem3_opts,
{db, opts})` while for the other dbs they were stored as `ets:insert(mem3_opts,
opts)`. All the requests would still work fine but the cache wouldn't be used
as the values would be loaded from the db doc every time.

Fix the bug and also adjust the name of `Opts` variable, we're not storing
props but opts so rename it to reflect reality and avoid confusion.

While at it, update the test suite to use the `?TDEF_FE` macro and get rid of
all the `_test(begin ... end)` boilerplate.
@nickva nickva requested a review from jiahuili430 October 6, 2025 18:28
Copy link
Contributor

@jaydoane jaydoane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@nickva nickva merged commit 34f9ff8 into main Oct 6, 2025
51 checks passed
@nickva nickva deleted the fix-mem3_ops branch October 6, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants