Commit ed318e1
committed
sharedcache: implement minimal version of metadata persistence
This commit implements an approach to persisting metadata thought of by Radu.
The metadata being persisted is the mapping from <filenum, logical block
offset> to the index of the cache block at which the data is located on disk.
The basic approach is to write changes to the metadata, plus metadata pointed
at by a ptr based on a sequence number, to a circular log that can be replayed
at server start time.
As of this commit, metadata persistence is neither performant nor safe in the
presence of crashes or certain errors happening at file write time. We need to
also implement the working set idea thought of by Radu, but this commit is
large enough without that.1 parent e7aa90f commit ed318e1
6 files changed
Lines changed: 381 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
0 commit comments