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
Here cmd/rpcdaemon/cli/config.go:onNewSnapshot
Now we use there agg.Open - it's not enough. Fully re-open all files - is also too brutal.
Less brutal is agg.OpenList -> closeWhatNotInList but this does "immediate close" - but we need "lazy close" (by last-alive-reader of this file).
We already have logic of "lazy remove" - DomainRoTx.Close() -> filesItem.canDelete. Maybe we also need "lazy close" - maybe even use same atomic (like change atomic to int bitmap).
reply.HistoryFiles - has list of good files (Can use it - but also can ingnore it - maybe OpenFiles -> scanDirtyFiles logic is enough)
Files which are not useful anymore: must be deleted from _dirtyFiles, but not closed. Need mark them as "ready to close" - and last-alive-reader will close it in AggTx.Close()
UnitTest: after handling onNewSnapshot notification:
last reader must close file without remove
old reader must be able to read from it - until it call aggTx.Close
Additional feature:
if reply.HistoryFiles is empty - don't call agg.Open
if reply.BlocksFiles is empty - don't call allSnapshots.ReopenList
The text was updated successfully, but these errors were encountered:
Here
cmd/rpcdaemon/cli/config.go:onNewSnapshot
Now we use there
agg.Open
- it's not enough. Fully re-open all files - is also too brutal.Less brutal is
agg.OpenList -> closeWhatNotInList
but this does "immediate close" - but we need "lazy close" (by last-alive-reader of this file).We already have logic of "lazy remove" -
DomainRoTx.Close() -> filesItem.canDelete
. Maybe we also need "lazy close" - maybe even use same atomic (like change atomic to int bitmap).reply.HistoryFiles
- has list of good files (Can use it - but also can ingnore it - maybeOpenFiles -> scanDirtyFiles
logic is enough)AggTx.Close()
UnitTest: after handling
onNewSnapshot
notification:aggTx.Close
Additional feature:
reply.HistoryFiles
is empty - don't callagg.Open
reply.BlocksFiles
is empty - don't callallSnapshots.ReopenList
The text was updated successfully, but these errors were encountered: