After commit dcaa54943e6 to fleece, we added a condition to cache Dict::key::_numericKey. This condition accidentally keeps the Query result to cache the keys unnecessarily.
The main idea of the PR is valid, but suggested better solution:
"I think the solution may be to add a cacheable flag to SharedKeys. It defaults to true, but there's a disableCaching method that forces it to return false. PersistentSharedKeys sets it to false while it's in a transaction.
"DictKey can then check sk->cacheable() instead of !sk->inTransaction().
"And DBAccess would call disableCaching on its tempSharedKeys."
Activity
Show:
CB robot April 8, 2024 at 7:40 PM
Build couchbase-lite-log-3.2.0-26 contains couchbase-lite-core commit 034f8fb with commit message: : Allow DictKeys to cache shared keys from query results (#1923)
CB robot April 8, 2024 at 7:23 PM
Build couchbase-lite-cblite-3.2.0-27 contains couchbase-lite-core commit 034f8fb with commit message: : Allow DictKeys to cache shared keys from query results (#1923)
CB robot March 9, 2024 at 12:46 AM
Build couchbase-lite-c-3.2.0-34 contains couchbase-lite-core commit 034f8fb with commit message: : Allow DictKeys to cache shared keys from query results (#1923)
CB robot February 2, 2024 at 5:57 PM
Build couchbase-lite-ios-3.2.0-55 contains couchbase-lite-core commit 034f8fb with commit message: : Allow DictKeys to cache shared keys from query results (#1923)
CB robot December 15, 2023 at 12:07 AM
Build couchbase-lite-core-3.2.0-119 contains couchbase-lite-core commit 034f8fb with commit message: : Allow DictKeys to cache shared keys from query results (#1923)
Fixed
Pinned fields
Click on the next to a field label to start pinning.
This is a follow-up of an external PR, https://github.com/couchbase/couchbase-lite-core/pull/1642.
After commit dcaa54943e6 to fleece, we added a condition to cache Dict::key::_numericKey. This condition accidentally keeps the Query result to cache the keys unnecessarily.
The main idea of the PR is valid, but suggested better solution:
"I think the solution may be to add a
cacheable
flag to SharedKeys. It defaults to true, but there's adisableCaching
method that forces it to return false. PersistentSharedKeys sets it to false while it's in a transaction."DictKey can then check
sk->cacheable()
instead of!sk->inTransaction()
."And DBAccess would call
disableCaching
on its tempSharedKeys."