╭ changed ────╮ │build.zig.zon│ ╰─────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 3 .version = "0.0.0", │ │ 4 .dependencies = .{ │ │ 5 .xit = .{ │ │ 6 - .url = "git+https://github.com/xit-vcs/xit#c6551bc1587169c23cbbe7b38b47d7746d612cae",│ │ 7 - .hash = "xit-0.0.0-Ub3nDLnuUAGeC8rudrtETGmtxePAzEHyoIwcSLkhA9Qe", │ │ 6 + .url = "git+https://github.com/xit-vcs/xit#2d33e6b357d4ed8f2de31809df74a3ccb60069d4",│ │ 7 + .hash = "xit-0.0.0-Ub3nDG-iUAF2KrcMS3r-NIoWHBbn2h9JLMLt3YRzP9Qd", │ │ 8 }, │ │ 9 }, │ │10 .paths = .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────╮ │src/event.zig│ ╰─────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │353 try commitEvents(.xit, repo_opts, state, ctx.io, ctx.allocator, ctx.ref, ctx.events, ctx.first_parent_oids); │ │354 if (!try consumeInTransaction(role, .xit, repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, ctx.ref)) return error.CancelTransaction;│ │355 try xit.undo.writeMessage(repo_opts, state, .{ .custom = "event" }); │ │356 - │ │357 - // fsync the chunk store, so any chunks written by the │ │358 - // commits are durable before the transaction commits │ │359 - try ctx.core.chunk_store_file.sync(ctx.io); │ │356 } │ │357 }; │ │358 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │402 const state = State(.read_write){ .core = ctx.core, .extra = .{ .moment = &moment } }; │ │403 if (!try mergeEventsInTransaction(.xit, repo_opts, state, ctx.io, ctx.allocator, ctx.remote_ref)) return error.CancelTransaction;│ │404 try xit.undo.writeMessage(repo_opts, state, .{ .custom = "event" }); │ │409 - try ctx.core.chunk_store_file.sync(ctx.io); │ │405 } │ │406 }; │ │407 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │602 try pch.detectMerged(repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, ctx.repo_root_path, updates.items.items, ctx.error_writer);│ │603 } │ │604 try xit.undo.writeMessage(repo_opts, state, .push); │ │610 - try ctx.core.chunk_store_file.sync(ctx.io); │ │605 } │ │606 }; │ │607 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───╮ │src/fork.zig│ ╰────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 99 { │ │100 try target_repo.core.db_file.lock(io, .shared); │ │101 defer target_repo.core.db_file.unlock(io); │ │102 - try target_repo.core.chunk_store_file.lock(io, .shared); │ │103 - defer target_repo.core.chunk_store_file.unlock(io); │ │102 │ │105 - // TODO: use reflinks here when the filesystem supports them │ │106 - for ([_]struct { file: std.Io.File, name: []const u8 }{ │ │107 - .{ .file = target_repo.core.db_file, .name = "db" }, │ │108 - .{ .file = target_repo.core.chunk_store_file, .name = "chunks" }, │ │109 - }) |source| { │ │110 - const destination = try fork_repo_dir.createFile(io, source.name, .{ .exclusive = true, .read = true }); │ │111 - defer destination.close(io); │ │112 - var read_buffer: [64 * 1024]u8 = undefined; │ │113 - var write_buffer: [64 * 1024]u8 = undefined; │ │114 - var reader = source.file.reader(io, &read_buffer); │ │115 - var writer = destination.writer(io, &write_buffer); │ │116 - _ = try reader.interface.streamRemaining(&writer.interface); │ │117 - try writer.interface.flush(); │ │118 - try destination.sync(io); │ │119 - } │ │103 + // TODO: use reflink here when the filesystem supports it │ │104 + const destination = try fork_repo_dir.createFile(io, "db", .{ .exclusive = true, .read = true }); │ │105 + defer destination.close(io); │ │106 + var read_buffer: [64 * 1024]u8 = undefined; │ │107 + var write_buffer: [64 * 1024]u8 = undefined; │ │108 + var reader = target_repo.core.db_file.reader(io, &read_buffer); │ │109 + var writer = destination.writer(io, &write_buffer); │ │110 + _ = try reader.interface.streamRemaining(&writer.interface); │ │111 + try writer.interface.flush(); │ │112 + try destination.sync(io); │ │113 } │ │114 │ │115 var fork_repo = try rp.Repo(.xit, repo_opts).open(io, allocator, .{ .path = fork_path, .require_repo_root = true });│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │369 if (!try evt.consumeInTransaction(.fork, .xit, repo_opts, state, &ctx.core.db, &moment, ctx.io, ctx.allocator, evt.events_ref)) return error.CancelTransaction;│ │370 } │ │371 try xit.undo.writeMessage(repo_opts, state, .push); │ │379 - try ctx.core.chunk_store_file.sync(ctx.io); │ │372 } │ │373 }; │ │374 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────╮ │src/patch.zig│ ╰─────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │215 } │ │216 │ │217 try xit.undo.writeMessage(repo_opts, state, .{ .custom = "merge patch" });│ │218 - try ctx.core.chunk_store_file.sync(ctx.io); │ │218 } │ │219 }; │ │220 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯