Skip to content

perf: Pool allocations of cachekv stores #24608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fastfadingviolets
Copy link
Contributor

@fastfadingviolets fastfadingviolets commented Apr 29, 2025

Description

Last week, on April 25, we ran a load test involving close to 40 validators and collected performance metrics from them. One thing that came up is that the cachekv that gets allocated to run each transaction is the top allocator:

Screenshot 2025-04-29 at 11 38 07 AM

My suggested perf improvement is to pool the cache objects themselves, as implemented in this PR. I tried a load test on a small set of nodes to see what this would do, and the result is a reduction in failures per second (i.e. "tx broadcasts that fail") from 96.73 in the baseline:

Screenshot 2025-04-29 at 11 46 44 AM

To 80.72 after this fix:

Screenshot 2025-04-29 at 11 47 18 AM

Note that I opened this against main, but it includes both changes to the sdk itself and to store. Let me know if you'd like this refactored at all, or split into two.

I'll throw the changelog together once I know that we're merging this, and how different bits are getting into different components.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues. Your PR will not be merged unless you satisfy
all of these items.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Summary by CodeRabbit

  • New Features

    • Introduced pooling for cache multi-stores and cache stores to optimize resource usage and reduce memory allocations.
    • Added methods to release pooled resources automatically after use, improving resource management and performance.
  • Performance Improvements

    • Enhanced cache reset operations to reuse existing data structures instead of reallocating memory, leading to more efficient cache management.

Copy link

ironbird-prod bot commented Apr 29, 2025

Ironbird - launch a network To use Ironbird, you can use the following commands:
  • /ironbird start OR /ironbird start --load-test-config= - Launch a testnet with the specified chain and load test configuration.
  • /ironbird chains - List of chain images that ironbird can use to spin-up testnet
  • /ironbird loadtests - List of load test modes that ironbird can run against testnet
Custom Load Test Configuration You can provide a custom load test configuration using the `--load-test-config=` flag:
/ironbird start cosmos --load-test-config={
  "block_gas_limit_target": 0.75,
  "num_of_blocks": 50,
  "msgs": [
    {"weight": 0.3, "type": "MsgSend"},
    {"weight": 0.3, "type": "MsgMultiSend"},
	{"weight": 0.4, "type": "MsgArr", "ContainedType": "MsgSend", "NumMsgs": 3300}
  ]
}

Use /ironbird loadtests to see more examples.

go.mod Outdated
@@ -204,3 +204,5 @@ retract (
// do not use
v0.43.0
)

replace cosmossdk.io/store => github.com/hyphacoop/cosmos-sdk/store v0.0.0-20250428150920-74852268c7e7
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can clean this up once I know what the merge plan is, I just don't know what best practices are for this kind of change that affects multiple components

Comment on lines 703 to 626
return ctx
}

type poolingStore interface {
storetypes.MultiStore
CacheMultiStorePooled() storetypes.PooledCacheMultiStore
}

// cacheTxContext returns a new context based off of the provided context with
// a branched multi-store.
func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context, storetypes.CacheMultiStore) {
ms := ctx.MultiStore()
Copy link
Contributor

Choose a reason for hiding this comment

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

Change potentially affects state.

Call sequence:

(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).getContextForTx (baseapp/baseapp.go:677)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).runTx (baseapp/baseapp.go:844)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).deliverTx (baseapp/baseapp.go:772)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).internalFinalizeBlock (baseapp/baseapp.go:705)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).FinalizeBlock (baseapp/baseapp.go:869)

Copy link
Contributor

coderabbitai bot commented Apr 29, 2025

📝 Walkthrough

Walkthrough

A set of changes introduces object pooling for cache multi-stores and cache key-value stores within the application's storage layer. New interfaces and types are defined to support pooled cache stores, including lifecycle management via Release() methods. Constructors and internal logic are updated to utilize object pools, reducing allocations by reusing store instances. Methods for clearing internal data structures are added to facilitate reuse. The transaction execution flow in the base application is updated to leverage pooled cache multi-stores when available, ensuring proper resource cleanup after use. Several method receivers are converted to pointers for consistency and to support pooling.

Changes

File(s) Change Summary
baseapp/baseapp.go Introduced poolingStore interface; updated transaction context handling to use pooled cache multi-stores if available; added deferred Release() calls for pooled stores in transaction execution.
store/types/store.go Added new PooledCacheMultiStore interface embedding CacheMultiStore and adding a Release() method.
store/cachekv/internal/btree.go Added Clear() method to BTree type to clear all entries without reallocating.
store/cachekv/store.go Introduced PooledStore struct for pooling; added storePool for managing pooled instances; implemented NewPooledStore() and Release(); updated cache reset logic to clear rather than reallocate BTree.
store/cachemulti/store.go Added PooledStore type for pooled cache multi-stores; implemented pooling via storePool; updated constructors to return pointers; added CacheMultiStorePooled() and Release(); changed method receivers to pointers.

Sequence Diagram(s)

sequenceDiagram
    participant BaseApp
    participant MultiStore (poolingStore)
    participant PooledCacheMultiStore
    participant RegularCacheMultiStore

    BaseApp->>MultiStore: cacheTxContext()
    alt MultiStore implements poolingStore
        MultiStore->>PooledCacheMultiStore: CacheMultiStorePooled()
        BaseApp->>PooledCacheMultiStore: use for tx processing
        BaseApp-->>PooledCacheMultiStore: defer Release()
    else
        MultiStore->>RegularCacheMultiStore: CacheMultiStore()
        BaseApp->>RegularCacheMultiStore: use for tx processing
    end
Loading
sequenceDiagram
    participant PooledStorePool
    participant PooledStore
    participant ParentStore

    BaseApp->>PooledStorePool: NewPooledStore(parent)
    PooledStorePool->>PooledStore: retrieve or create
    PooledStore->>ParentStore: set parent reference
    BaseApp->>PooledStore: use for caching
    BaseApp->>PooledStore: Release()
    PooledStore->>PooledStore: reset caches, clear parent
    PooledStore->>PooledStorePool: return to pool
Loading
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (1)
baseapp/baseapp.go (1)

989-991: Same “defer Release” duplication

See previous comment – extracting a helper would remove this repetition.

🧹 Nitpick comments (7)
store/cachekv/internal/btree.go (1)

39-41: Receiver should probably be a pointer to avoid silent struct-copy

Clear() takes the receiver by value, which means the BTree struct (currently one word) is copied before invoking the underlying bt.tree.Clear().
While harmless today, this has two downsides:

  1. If more fields are ever added to BTree, the copy becomes more expensive.
  2. A pointer receiver is the idiomatic choice for mutating methods and makes the intent explicit.
-func (bt BTree) Clear() {
+func (bt *BTree) Clear() {
     bt.tree.Clear()
 }

Call-sites would remain unchanged because the compiler automatically takes the address where needed (store.sortedCache.Clear()).
Feel free to keep the value receiver if you want to guarantee immutability of the wrapper itself, but please leave a short comment documenting that decision.

store/types/store.go (1)

155-158: Document the lifecycle contract of Release()

The new PooledCacheMultiStore interface introduces Release(), but there is no doc-comment that explains:

  • When callers must invoke it (after Write()? Always?).
  • Whether it is idempotent.
  • Whether the object is still usable afterwards (it currently is not).

Adding a short comment will avoid misuse and future bugs, e.g.:

// Release returns the instance to its pool. After calling Release the receiver
// MUST NOT be used again. Calling Release multiple times is safe/no-op.
store/cachekv/store.go (2)

35-37: Consider embedding *Store instead of Store

Embedding Store by value means every PooledStore contains its own copy of
the Store struct. All pointer-receiver methods on Store still work, but the
extra copy slightly increases the size of each pooled object (two cache maps,
B-tree, mutex, etc.) and forces Go to copy that memory when the pool hands out
an instance.

A lighter alternative is:

-type PooledStore struct { Store }
+type PooledStore struct { *Store }

and constructing it with &PooledStore{Store: &Store{ ... }}.
Not critical, but worth considering if the pool becomes large.


143-143: Clearing the B-tree may retain large backing arrays

btree.Clear() resets the length to zero but does not free node memory. For
workloads with occasional huge bursts (e.g. Genesis), this can keep tens of MB
alive inside the pool. Consider the same “size threshold” strategy used for
map caches: if store.sortedCache.Len() > bigN { store.sortedCache = internal.NewBTree() }.

baseapp/baseapp.go (2)

706-709: Avoid duplicating public-facing interfaces

poolingStore re-declares behaviour that arguably belongs in store/types.
Long-term, keep the contract in a single place (e.g. storetypes.MultiStore plus a build‐tagged extension) to prevent diverging expectations and import-cycle work-arounds.

[nit]


935-939: DRY – factor the “defer Release” boilerplate

This pattern re-appears several times in runTx. Consider a tiny helper:

func deferIfPooled(cms storetypes.CacheMultiStore) {
	if p, ok := cms.(storetypes.PooledCacheMultiStore); ok {
		defer p.Release()
	}
}

Then call deferIfPooled(msCache) to avoid accidental omissions when new call-sites are added.

store/cachemulti/store.go (1)

200-202: Minor: method name leaks implementation detail

CacheMultiStorePooled is fine, but for symmetry with CacheMultiStore consider
CacheMultiStorePool() or CacheMultiStoreFromPool() to read as an action
instead of an adjective. Optional.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f9e0f72 and bd4b9b6.

⛔ Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (5)
  • baseapp/baseapp.go (3 hunks)
  • store/cachekv/internal/btree.go (1 hunks)
  • store/cachekv/store.go (4 hunks)
  • store/cachemulti/store.go (7 hunks)
  • store/types/store.go (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
baseapp/baseapp.go (1)
store/types/store.go (3)
  • MultiStore (115-147)
  • PooledCacheMultiStore (155-158)
  • CacheMultiStore (150-153)
store/cachemulti/store.go (3)
store/types/store.go (9)
  • Store (17-20)
  • CacheMultiStore (150-153)
  • PooledCacheMultiStore (155-158)
  • KVStore (251-269)
  • StoreKey (371-374)
  • CacheWrapper (308-314)
  • TraceContext (464-464)
  • CacheWrap (297-306)
  • MultiStore (115-147)
store/cachekv/store.go (4)
  • Store (27-33)
  • PooledStore (35-37)
  • NewStore (42-49)
  • NewPooledStore (69-73)
store/rootmulti/store.go (2)
  • Store (59-82)
  • NewStore (93-107)
⏰ Context from checks skipped due to timeout of 90000ms (14)
  • GitHub Check: tests (03)
  • GitHub Check: tests (01)
  • GitHub Check: tests (00)
  • GitHub Check: test-sim-nondeterminism
  • GitHub Check: test-integration
  • GitHub Check: test-e2e
  • GitHub Check: Check up to date mocks
  • GitHub Check: build (arm64)
  • GitHub Check: Analyze
  • GitHub Check: build (amd64)
  • GitHub Check: Gosec
  • GitHub Check: Summary
  • GitHub Check: golangci-lint
  • GitHub Check: dependency-review
🔇 Additional comments (3)
store/cachekv/store.go (2)

51-61: sync.Pool factory leaks the inner Store on grow-only paths

When resetCaches decides the cache grew past 100 000 entries it allocates
fresh maps, but the capacity of those maps remains captured in the pooled
object forever. Re-using that object therefore retains the high-water memory
usage, partly defeating the goal of lowering allocations.

Two quick mitigations:

 store.resetCaches()
+// Reset heavy internal state that Clear() doesn’t shrink.
+if cap(store.cache) > 200_000 {
+    store.cache = make(map[string]*cValue)
+}

or periodically create a brand-new PooledStore after N uses.

Would you like a micro-benchmark to quantify the retained capacity?


69-73: Ensure pooled instances start with empty caches

NewPooledStore assumes resetCaches ran during Release(). If a buggy
caller forgets to Release, the next Get() will return an object that still
contains stale state. You can detect this early:

if len(store.cache) != 0 {
    panic("using a pooled Store that was not Released")
}

or, more leniently, call store.resetCaches() defensively here.

baseapp/baseapp.go (1)

715-720: Gracefully fall back when pooled implementation is missing

The branching logic works, but if a downstream MultiStore advertises CacheMultiStorePooled yet returns nil (e.g. pool exhausted or disabled by feature flag) the code panics on the next dereference. A defensive check makes the change safer during rollout:

-	if msPooled, ok := ms.(poolingStore); ok {
-		msCache = msPooled.CacheMultiStorePooled()
+	if msPooled, ok := ms.(poolingStore); ok {
+		if pooled := msPooled.CacheMultiStorePooled(); pooled != nil {
+			msCache = pooled
+		} else {
+			msCache = ms.CacheMultiStore()
+		}
 	} else {
 		msCache = ms.CacheMultiStore()
 	}

Comment on lines 63 to 71
func (store *PooledStore) Release() {
store.resetCaches()
store.parent = nil
storePool.Put(store)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Reset the mutex to guarantee a clean state before pooling

If any caller accidentally leaves store.mtx in a locked state, Release
will silently pool an object whose mutex can never be locked again, leading to
a hard-to-reproduce deadlock the next time it is checked out.

Guard against this by zeroing the mutex:

 func (store *PooledStore) Release() {
     store.resetCaches()
+    store.mtx = sync.Mutex{}
     store.parent = nil
     storePool.Put(store)
 }

Cheap insurance, even if current call-sites appear correct.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
func (store *PooledStore) Release() {
store.resetCaches()
store.parent = nil
storePool.Put(store)
}
func (store *PooledStore) Release() {
store.resetCaches()
store.mtx = sync.Mutex{}
store.parent = nil
storePool.Put(store)
}
🤖 Prompt for AI Agents (early access)
In store/cachekv/store.go around lines 63 to 67, the Release method should reset the store's mutex to a zero value before putting the store back into the pool. This prevents pooling a store with a locked mutex, which would cause deadlocks later. Add a line to assign a new zero-value mutex to store.mtx before calling storePool.Put(store).

@fastfadingviolets fastfadingviolets marked this pull request as draft April 29, 2025 16:03
@fastfadingviolets fastfadingviolets force-pushed the perf/pool-cachekv branch 2 times, most recently from 4db8b81 to c4feb72 Compare April 29, 2025 16:51
@fastfadingviolets fastfadingviolets force-pushed the perf/pool-cachekv branch 3 times, most recently from 98af2ef to e6365dc Compare May 5, 2025 19:26
@zsystm
Copy link

zsystm commented May 7, 2025

@fastfadingviolets
The optimization is related to memory allocation and garbage collection, but the metrics you shared are from Locust, so it's a bit hard to grasp the direct impact on memory and GC.

Would it be possible to share metrics specifically related to memory and GC as well? I’m curious to see the quantitative improvements, if any.

@fastfadingviolets
Copy link
Contributor Author

fastfadingviolets commented May 12, 2025

@fastfadingviolets The optimization is related to memory allocation and garbage collection, but the metrics you shared are from Locust, so it's a bit hard to grasp the direct impact on memory and GC.

Would it be possible to share metrics specifically related to memory and GC as well? I’m curious to see the quantitative improvements, if any.

absolutely! Let me share some graphs here. I ran two half-hour load tests; you'll see two big humps in my graph. The first one is without the optimization, the second one's with it.

First, rates of objects being allocated go down from ~1.4M to ~1.1M:

Screenshot 2025-05-12 at 2 20 50 PM

Allocation rates (i.e. same thing but in MB) goes from ~100MB/s to ~80MB/s:

Screenshot 2025-05-12 at 2 21 36 PM

Annoyingly, the GC histogram seems to show GCs getting longer with the fix, but I think that that's because we're doing fewer garbage collections, and so there's more to collect. This graph doesn't have the 99th percentile:

Screenshot 2025-05-12 at 2 27 18 PM

The 99th percentile goes up pretty significantly (it's likely this is also affected by startup operations, though):

Screenshot 2025-05-12 at 2 28 29 PM

However! If I look at the CPU profile, I can see we're spending less time in garbage collection overall, by about 8%, which would be consistent with the theory that we're just doing fewer GCs:

Screenshot 2025-05-12 at 2 29 47 PM

Lastly, just for the heck of it, we went from cacheTxContext being responsible for 12% of objects allocated to <0.1%:

Screenshot 2025-05-12 at 2 31 56 PM

This translates to about 10% fewer allocated objects in runTx:

Screenshot 2025-05-12 at 2 34 16 PM

Let me know if you'd like me to collect any more metrics!

This means that hot code that provisions caches, such as runTx, can
re-use already allocated memory-space for their cache, without having
to suffer the hit of a new allocation.
This prevents a per-tx allocation of the cache.
Comment on lines 624 to +631
// a branched multi-store.
func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context, storetypes.CacheMultiStore) {
ms := ctx.MultiStore()
msCache := ms.CacheMultiStore()
var msCache storetypes.CacheMultiStore
if msPooled, ok := ms.(storetypes.PoolingMultiStore); ok {
msCache = msPooled.CacheMultiStorePooled()
} else {
msCache = ms.CacheMultiStore()
Copy link
Contributor

Choose a reason for hiding this comment

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

Change potentially affects state.

Call sequence:

(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).cacheTxContext (baseapp/baseapp.go:625)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).runTx (baseapp/baseapp.go:760)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).deliverTx (baseapp/baseapp.go:688)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).internalFinalizeBlock (baseapp/baseapp.go:718)
(*github.com/cosmos/cosmos-sdk/baseapp.BaseApp).FinalizeBlock (baseapp/baseapp.go:884)

@fastfadingviolets fastfadingviolets marked this pull request as ready for review May 13, 2025 15:51
Copy link
Contributor

@aljo242 aljo242 left a comment

Choose a reason for hiding this comment

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

mainly nits - this is looking great


// NewFromKVStore creates a new Store object from a mapping of store keys to
// CacheWrapper objects and a KVStore as the database. Each CacheWrapper store
// is a branched store.
func NewFromKVStore(
store types.KVStore, stores map[types.StoreKey]types.CacheWrapper,
keys map[string]types.StoreKey, traceWriter io.Writer, traceContext types.TraceContext,
) Store {
cms := Store{
) *Store {
Copy link
Contributor

Choose a reason for hiding this comment

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

why did we need to change this function sig?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue is ultimately that sync.Pool works with pointers--if it didn't you'd end up copying the struct that it's trying to allocate for you--so I needed to be able to return a pointer to the PooledStore in newFromKVStorePooled. Once I'd made that change, interface compliance broke everywhere because the methods had value receivers. It ended up being simplest to just change everything to pointers for consistency.

@aljo242
Copy link
Contributor

aljo242 commented May 13, 2025

@fastfadingviolets we will need a changelog in both the root CHANGELOG.md and the one in ./store

@fastfadingviolets
Copy link
Contributor Author

@aljo242 added changelog stuff & i think i've incorporated all your comments! I'm assuming this is gonna get squashed so I'm just pushing new commits, but lmk if you want me to squash them myself

Comment on lines +128 to +133
for k, v := range cms.stores {
if pStore, ok := v.(types.PooledCacheKVStore); ok {
pStore.Release()
}
delete(cms.stores, k)
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
Comment on lines +134 to +136
for k := range cms.keys {
delete(cms.keys, k)
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
@aljo242 aljo242 requested a review from aaronc May 14, 2025 14:02
@aljo242
Copy link
Contributor

aljo242 commented May 14, 2025

adding @aaronc to take a look

@aljo242
Copy link
Contributor

aljo242 commented May 15, 2025

@fastfadingviolets we have some conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants