You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We added tree time accounting to the ocis storage driver which is modeled after [eos synctime accounting](http://eos-docs.web.cern.ch/eos-docs/configuration/namespace.html#enable-subtree-accounting).
4
+
It can be enabled using the new `treetime_accounting` option, which defaults to `false`
5
+
The `tmtime` is stored in an extended attribute `user.ocis.tmtime`. The treetime accounting is enabled for nodes which have the `user.ocis.propagation` extended attribute set to `"1"`. Currently, propagation is in sync.
log.Error().Err(err).Interface("node", n).Str("tmtime", string(b)).Msg("invalid format, overwriting")
351
-
updateSyncTime=true
352
-
} elseiftmTime.Before(fi.ModTime()) {
353
-
log.Debug().Interface("node", n).Str("tmtime", string(b)).Str("mtime", fi.ModTime().UTC().Format(time.RFC3339Nano)).Msg("parent tmtime is older than node mtime, updating")
354
-
updateSyncTime=true
355
-
} else {
356
-
log.Debug().Interface("node", n).Str("tmtime", string(b)).Str("mtime", fi.ModTime().UTC().Format(time.RFC3339Nano)).Msg("parent tmtime is younger than node mtime, not updating")
357
-
}
329
+
330
+
vartmTime time.Time
331
+
tmTime, err=n.GetTMTime()
332
+
switch {
333
+
caseerr!=nil:
334
+
// missing attribute, or invalid format, overwrite
335
+
log.Error().Err(err).Interface("node", n).Msg("could not read tmtime attribute, overwriting")
336
+
updateSyncTime=true
337
+
casetmTime.Before(fi.ModTime()):
338
+
log.Debug().Interface("node", n).Str("tmtime", string(b)).Str("mtime", fi.ModTime().UTC().Format(time.RFC3339Nano)).Msg("parent tmtime is older than node mtime, updating")
339
+
updateSyncTime=true
340
+
default:
341
+
log.Debug().Interface("node", n).Str("tmtime", string(b)).Str("mtime", fi.ModTime().UTC().Format(time.RFC3339Nano)).Msg("parent tmtime is younger than node mtime, not updating")
0 commit comments