AMOOOMA opened a new pull request, #41604: URL: https://github.com/apache/beam/pull/41604
> **Note:** **DO NOT SUBMIT / DO NOT MERGE — Testing only.** ## Summary `WindmillMultimap.persistDirectly()` previously called `cache.put(namespace, stateKey, this, 1)`, billing the entire cached multimap (and every `MapState` on Streaming Engine via `WindmillMapViaMultimap`) as 1 byte in `WindmillStateCache`. Because Guava's `maximumWeight` (`--workerCacheMb`) and `maxCachedEntryBytes` saw only 1 byte per state tag, large or high-cardinality `MapState`/`MultimapState` entries could accumulate on the worker JVM heap without triggering cache eviction. This change incrementally tracks encoded key/value byte sizes plus per-key `KeyState` overhead across `put`, `persistDirectly`, `remove`, `clear`, `get`, `keys`, and `entries`, and passes the tracked byte weight to `WindmillStateCache`. ## Testing - Added unit tests in `WindmillStateCacheTest` covering mutation weight updates (including value overwrites, key removals, and `clear()`), storage-read hydration weight (`get` and `entries` on read-only work items), Guava weight-based cache eviction, and `maxCachedEntryBytes` rejection. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
