Move ref writing to be transaction-based
Rather than having separate write_ref calls, make clients start a transaction, add some refs, and then commit it. While this doesn't make it 100% atomic, it makes it easier for us to use an atomic model, and it means we don't do as much I/O updating the summary file and such. https://bugzilla.gnome.org/show_bug.cgi?id=707644
This commit is contained in:
1 parent
bd2948e964
commit
91d3b90c9f
13 files changed
+189
-101
No files matched your search
@@ -100,6 +100,7 @@ ostree_repo_finalize (GObject *object)
|
||||
g_hash_table_destroy (self->updated_uncompressed_dirs);
|
||||
if (self->config)
|
||||
g_key_file_free (self->config);
|
||||
g_clear_pointer (&self->txn_refs, g_hash_table_destroy);
|
||||
g_clear_pointer (&self->cached_meta_indexes, (GDestroyNotify) g_ptr_array_unref);
|
||||
g_clear_pointer (&self->cached_content_indexes, (GDestroyNotify) g_ptr_array_unref);
|
||||
g_mutex_clear (&self->cache_lock);
|
||||
|
||||
Reference in new issue
Block a user