AlloyDB Omni invalidates cache after restart

I’m running AlloyDB Omni in a containerized environment and have noticed that the columnar cache is completely invalidated after every restart and must be rebuilt each time.

For the setup, I have a persistent PGDATA volume and a persistent AlloyDB cache directory (mounted separately).

I understand that AlloyDB’s columnar cache consists of two layers:

  • Memory cache (in-memory, expected to be lost on restart)

  • Storage cache (on disk, expected to persist across restarts)

Losing the memory cache on restart is completely understandable. However, it’s unclear why the storage cache is also fully invalidated and rebuilt.

It seems like it should be possible to reuse the existing storage cache, or explicitly disable the memory cache (e.g. allowing setting google_columnar_engine.memory_size_in_mb to 0) and rely purely on the storage cache for correctness and warm-start behaviour.

This would significantly speed up local development, as I have a relatively large dataset that takes the columnar engine an hour to populate.

1 Like

Hi @z.li AlloyDB Omni currently does not guarantee reuse of the on disk columnar storage cache after a restart Even if the cache directory is persisted the engine may invalidate it during startup due to internal consistency checks version metadata WAL state or catalog changes so a full rebuild is expected behavior in many cases

The storage cache is treated as an optimization artifact not as a durable correctness layer so it can be discarded safely at restart The memory layer is always rebuilt and the storage layer may also be invalidated if the engine cannot verify exact compatibility with the previous state

Setting google_columnar_engine.memory_size_in_mb to 0 to force storage only operation is not supported because the engine is designed around coordinated memory and storage layers

For faster local development typical approaches are reducing dataset size prewarming via scripted queries after startup or avoiding frequent container restarts At the moment warm start reuse of the storage cache is not reliably supported in Omni

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.