Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swarm/storage: fix access count on dbstore after cache hit #17978

Merged
merged 1 commit into from
Nov 13, 2018

Conversation

frncmx
Copy link
Contributor

@frncmx frncmx commented Oct 25, 2018

Access count was not incremented when chunk was retrieved
from cache. So the garbage collector might have deleted the most
frequently accessed chunk from disk.

@zelig zelig assigned frncmx and unassigned zelig Oct 27, 2018
@frncmx frncmx force-pushed the cache-accesscnt-fix branch from 66ef1f6 to 28b03a3 Compare October 27, 2018 07:52
@frncmx
Copy link
Contributor Author

frncmx commented Oct 27, 2018

Note: The simplification of the LDBStore.Close() will come in another PR.

@frncmx frncmx force-pushed the cache-accesscnt-fix branch from 28b03a3 to ade00d1 Compare October 27, 2018 09:58
@frncmx frncmx assigned zelig and unassigned frncmx Oct 27, 2018
@frncmx frncmx requested a review from nolash October 28, 2018 09:12
@frncmx frncmx assigned nolash and unassigned zelig Oct 28, 2018
swarm/storage/ldbstore.go Outdated Show resolved Hide resolved
swarm/storage/ldbstore.go Outdated Show resolved Hide resolved
swarm/storage/ldbstore.go Outdated Show resolved Hide resolved
swarm/storage/ldbstore.go Outdated Show resolved Hide resolved
@frncmx frncmx assigned frncmx and unassigned nolash Nov 9, 2018
@frncmx frncmx force-pushed the cache-accesscnt-fix branch from 8a80f2a to 9689003 Compare November 11, 2018 16:49
@frncmx frncmx removed their assignment Nov 11, 2018
swarm/storage/localstore_test.go Outdated Show resolved Hide resolved
swarm/storage/localstore_test.go Outdated Show resolved Hide resolved
Access count was not incremented when chunk was retrieved
from cache. So the garbage collector might have deleted the most
frequently accessed chunk from disk.

Co-authored-by: Ferenc Szabo <ferenc.szabo@ethereum.org>
@frncmx frncmx force-pushed the cache-accesscnt-fix branch from 9689003 to 33c349b Compare November 12, 2018 14:30
Copy link
Member

@acud acud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@zelig zelig merged commit 8080265 into ethereum:master Nov 13, 2018
@acud acud deleted the cache-accesscnt-fix branch November 13, 2018 07:30
@karalabe karalabe added this to the 1.8.18 milestone Nov 13, 2018
@frncmx frncmx unassigned acud Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants