mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 15:06:36 +08:00
feat(storage): implement Redis distributed lock and cache invalidation broadcasting
- Add Redis distributed lock in Execute of MigrationHandler to prevent concurrent storage migrations. - Define storage:config_invalidation Redis pub/sub channel to broadcast cache invalidation events. - Implement background pub/sub listener on all nodes to evict config memory cache concurrently. - Add integration tests for distributed locking and invalidation propagation using miniredis.
This commit is contained in:
@@ -248,6 +248,7 @@ func UpdateSystemConfig(c *gin.Context) {
|
||||
|
||||
if key == model.ConfigKeyStorageConfig {
|
||||
storage.ResetCache()
|
||||
storage.PublishCacheInvalidation(c.Request.Context())
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, util.OKNil())
|
||||
|
||||
Reference in New Issue
Block a user