storage: flush/sync contents to disk on file close

Behavior controlled by configuration (default=off)
It is a trade-off between performance and consistency.

References:
[1] https://github.com/golang/go/issues/20599

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
Ramkumar Chinchani
2022-01-21 04:11:44 +00:00
committed by Ramkumar Chinchani
parent c73e71b018
commit d2aa016cdb
20 changed files with 621 additions and 113 deletions
+3 -1
View File
@@ -21,6 +21,7 @@ type StorageConfig struct {
RootDirectory string
GC bool
Dedupe bool
Commit bool
StorageDriver map[string]interface{} `mapstructure:",omitempty"`
}
@@ -90,9 +91,10 @@ type LogConfig struct {
}
type GlobalStorageConfig struct {
RootDirectory string
Dedupe bool
GC bool
Commit bool
RootDirectory string
StorageDriver map[string]interface{} `mapstructure:",omitempty"`
SubPaths map[string]StorageConfig
}