mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-02 18:30:14 -06:00
Fix cache config and search logging (#4732)
* make share event logging more distinguishable Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix cache stat table config Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add changelog Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
committed by
GitHub
parent
84a775dcc3
commit
b257ba6664
5
changelog/unreleased/fix-cache-config.md
Normal file
5
changelog/unreleased/fix-cache-config.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Bugfix: Fix cache stat table config
|
||||
|
||||
We have aligned the cache table config for the gateway and the dataprovider to make them actually use the same cache instance.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/4732
|
||||
@@ -38,7 +38,12 @@ func (p *Provider) handleEvent(ev interface{}) {
|
||||
}
|
||||
statRes, err := p.statResource(ownerCtx, ref, owner)
|
||||
if err != nil {
|
||||
p.logger.Error().Err(err).Msg("failed to stat the changed resource")
|
||||
p.logger.Error().Err(err).
|
||||
Str("storageid", ref.GetResourceId().GetStorageId()).
|
||||
Str("spaceid", ref.GetResourceId().GetSpaceId()).
|
||||
Str("opaqueid", ref.GetResourceId().GetOpaqueId()).
|
||||
Str("path", ref.GetPath()).
|
||||
Msg("failed to make stat call for the restored resource")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -46,10 +51,20 @@ func (p *Provider) handleEvent(ev interface{}) {
|
||||
case rpc.Code_CODE_OK:
|
||||
err = p.indexClient.Restore(statRes.Info.Id)
|
||||
if err != nil {
|
||||
p.logger.Error().Err(err).Msg("failed to restore the changed resource in the index")
|
||||
p.logger.Error().Err(err).
|
||||
Str("storageid", ref.GetResourceId().GetStorageId()).
|
||||
Str("spaceid", ref.GetResourceId().GetSpaceId()).
|
||||
Str("opaqueid", ref.GetResourceId().GetOpaqueId()).
|
||||
Str("path", ref.GetPath()).
|
||||
Msg("failed to restore the changed resource in the index")
|
||||
}
|
||||
default:
|
||||
p.logger.Error().Interface("statRes", statRes).Msg("failed to stat the changed resource")
|
||||
p.logger.Error().Interface("statRes", statRes).
|
||||
Str("storageid", ref.GetResourceId().GetStorageId()).
|
||||
Str("spaceid", ref.GetResourceId().GetSpaceId()).
|
||||
Str("opaqueid", ref.GetResourceId().GetOpaqueId()).
|
||||
Str("path", ref.GetPath()).
|
||||
Msg("failed to stat the restored resource")
|
||||
}
|
||||
|
||||
return
|
||||
@@ -122,11 +137,21 @@ func (p *Provider) handleEvent(ev interface{}) {
|
||||
|
||||
statRes, err := p.statResource(ownerCtx, ref, owner)
|
||||
if err != nil {
|
||||
p.logger.Error().Err(err).Msg("failed to stat the changed resource")
|
||||
p.logger.Error().Err(err).
|
||||
Str("storageid", ref.GetResourceId().GetStorageId()).
|
||||
Str("spaceid", ref.GetResourceId().GetSpaceId()).
|
||||
Str("opaqueid", ref.GetResourceId().GetOpaqueId()).
|
||||
Str("path", ref.GetPath()).
|
||||
Msg("failed to make stat call for changed resource")
|
||||
return
|
||||
}
|
||||
if statRes.Status.Code != rpc.Code_CODE_OK {
|
||||
p.logger.Error().Interface("statRes", statRes).Msg("failed to stat the changed resource")
|
||||
p.logger.Error().Interface("statRes", statRes).
|
||||
Str("storageid", ref.GetResourceId().GetStorageId()).
|
||||
Str("spaceid", ref.GetResourceId().GetSpaceId()).
|
||||
Str("opaqueid", ref.GetResourceId().GetOpaqueId()).
|
||||
Str("path", ref.GetPath()).
|
||||
Msg("failed to stat the changed resource")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -112,14 +112,17 @@ func StorageSystemFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
"simple": map[string]interface{}{
|
||||
"cache_store": "noop",
|
||||
"cache_database": "system",
|
||||
"cache_table": "stat",
|
||||
},
|
||||
"spaces": map[string]interface{}{
|
||||
"cache_store": "noop",
|
||||
"cache_database": "system",
|
||||
"cache_table": "stat",
|
||||
},
|
||||
"tus": map[string]interface{}{
|
||||
"cache_store": "noop",
|
||||
"cache_database": "system",
|
||||
"cache_table": "stat",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -57,16 +57,19 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
"cache_store": cfg.Cache.Store,
|
||||
"cache_nodes": cfg.Cache.Nodes,
|
||||
"cache_database": cfg.Cache.Database,
|
||||
"cache_table": "stat",
|
||||
},
|
||||
"spaces": map[string]interface{}{
|
||||
"cache_store": cfg.Cache.Store,
|
||||
"cache_nodes": cfg.Cache.Nodes,
|
||||
"cache_database": cfg.Cache.Database,
|
||||
"cache_table": "stat",
|
||||
},
|
||||
"tus": map[string]interface{}{
|
||||
"cache_store": cfg.Cache.Store,
|
||||
"cache_nodes": cfg.Cache.Nodes,
|
||||
"cache_database": cfg.Cache.Database,
|
||||
"cache_table": "stat",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user