deltas: Update delta indexes when updating summary
When we update the summary file (and its list of deltas) we also update
all delta indexes. The index format is a single `a{sv}` variant identical
to the metadata-part of the summary with (currently) only the
`ostree.static-deltas` key.
Since we expect most delta indexes to change rarely, we avoid
unnecessary writes when reindexing. New indexes are compared to
existing ones and only the changed ones are written to disk. This
avoids unnecessary write load and mtime changes on the repo server.
This commit is contained in:
1 parent
8e1f199dd4
commit
effde3d513
3 files changed
+173
No files matched your search
@@ -5927,6 +5927,9 @@ ostree_repo_regenerate_summary (OstreeRepo *self,
|
||||
g_variant_ref_sink (summary);
|
||||
}
|
||||
|
||||
if (!_ostree_repo_static_delta_reindex (self, NULL, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
if (!_ostree_repo_file_replace_contents (self,
|
||||
self->repo_dir_fd,
|
||||
"summary",
|
||||
|
||||
Reference in new issue
Block a user