}
g_array_unref(log->links);
bluesky_string_unref(log->data);
+ if (log->dirty_journal != NULL)
+ g_atomic_int_add(&log->dirty_journal->dirty_refs, -1);
g_free(log);
}
}
g_string_append_len(state->data, (const char *)&header, sizeof(header));
g_string_append_len(state->data, log->data->data, log->data->len);
+ /* TODO: We should mark the objects as committed on the cloud until the
+ * data is flushed and acknowledged. */
log->location_flags |= CLOUDLOG_CLOUD;
bluesky_cloudlog_stats_update(log, 1);
+ if (log->dirty_journal != NULL) {
+ g_atomic_int_add(&log->dirty_journal->dirty_refs, -1);
+ log->dirty_journal = NULL;
+ }
g_mutex_unlock(log->lock);
if (state->data->len > CLOUDLOG_SEGMENT_SIZE)