Repository navigation
GWC in-memory distributed caching - #1612
dromagnoli wants to merge 1 commit into
Conversation
6b0c702 to
e5cabbb
Compare
e5cabbb to
25a5dc3
Compare
aaime
left a comment
There was a problem hiding this comment.
Thanks for this. The direction looks good, and the outage handling and the Hazelcast usage show a lot of care. The inline comments below fall into four themes:
- Structure and naming. Names that collide with existing GWC concepts, and state and logic split between TileCache and CachingBlobStore. Please follow the existing GWC patterns (BlobStoreInfo as a factory) and
pull the outage state machine into its own class. - Consistency of the cache. Read-through races, and truncates during an outage that leave stale tiles behind. A truncate should fail rather than half succeed.
- Cluster locks. Not wired, and more complex than they need to be.
- Configuration. Not reachable through REST.
In addition, What's thHazelcast bulk calls have no timeout. delete, removeAll, aggregate, keySet, addIndex and clear can wait 60 s on a member that doesn't answer, while holding the configLock read lock.
The sorted index is added to the customer's map at runtime. It's undocumented, and if it fails, every truncate fails.
I'll follow up with the corresponding geoserver review
25a5dc3 to
24aa2a2
Compare
|
All Feedbacks have been addressed. |
20f23a6 to
3da46a2
Compare
aaime
left a comment
There was a problem hiding this comment.
Thanks for the rework. The split into MemoryCache and GuardedStore, the KeyValueStoreInfo factories, the wired lock provider and the REST endpoint answer the first round well, and most earlier points are
resolved.
Two points still need a change before merge, both covered inline:
- HazelcastKeyValueStore.putIfAbsent has no deadline. With passthrough on, every read-through can hold a request thread and the blob store read lock for up to 60 s on a silent member.
- Tile and range deletes fail while the cache is down. That stops disk quota, and with passthrough on the blob store fills up during a long outage.
3da46a2 to
949d5a5
Compare
|
The 2 remaining points have been covered |
Add support for In-memory tile caching and provide Hazelcast implementation.
The in-memory tile cache keeps the most requested tiles in memory, in front of the blob stores. It is meant for layers whose tiles expire quickly and are requested by many clients at once, where reading each tile from disk or from a cloud store costs more than rendering time saved.
Downstream integration failures are expected.
A dedicated GS PR is available for that:
geoserver/geoserver#10214