Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(rpc): io_uring integration & redesign #477

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/accountsdb/db.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3390,6 +3390,7 @@ test "testWriteSnapshot" {
);
}

/// Unpacks the snapshots from `sig.TEST_DATA_DIR`.
pub fn findAndUnpackTestSnapshots(
n_threads: usize,
/// The directory into which the snapshots are unpacked.
Expand Down
11 changes: 6 additions & 5 deletions src/accountsdb/snapshots.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2225,7 +2225,7 @@ pub const FullSnapshotFileInfo = struct {
slot: Slot,
hash: Hash,

const SnapshotArchiveNameFmtSpec = sig.utils.fmt.BoundedSpec("snapshot-{[slot]d}-{[hash]s}.tar.zst");
pub const SnapshotArchiveNameFmtSpec = sig.utils.fmt.BoundedSpec("snapshot-{[slot]d}-{[hash]s}.tar.zst");

pub const SnapshotArchiveNameStr = SnapshotArchiveNameFmtSpec.BoundedArrayValue(.{
.slot = std.math.maxInt(Slot),
Expand Down Expand Up @@ -2352,7 +2352,7 @@ pub const IncrementalSnapshotFileInfo = struct {
};
}

const SnapshotArchiveNameFmtSpec = sig.utils.fmt.BoundedSpec("incremental-snapshot-{[base_slot]d}-{[slot]d}-{[hash]s}.tar.zst");
pub const SnapshotArchiveNameFmtSpec = sig.utils.fmt.BoundedSpec("incremental-snapshot-{[base_slot]d}-{[slot]d}-{[hash]s}.tar.zst");

pub const SnapshotArchiveNameStr = SnapshotArchiveNameFmtSpec.BoundedArrayValue(.{
.base_slot = std.math.maxInt(Slot),
Expand Down Expand Up @@ -2498,15 +2498,16 @@ pub const SnapshotFiles = struct {
full: FullSnapshotFileInfo,
incremental_info: ?SlotAndHash,

pub fn incremental(snapshot_files: SnapshotFiles) ?IncrementalSnapshotFileInfo {
const inc_info = snapshot_files.incremental_info orelse return null;
pub fn incremental(self: SnapshotFiles) ?IncrementalSnapshotFileInfo {
const inc_info = self.incremental_info orelse return null;
return .{
.base_slot = snapshot_files.full.slot,
.base_slot = self.full.slot,
.slot = inc_info.slot,
.hash = inc_info.hash,
};
}

/// Asserts that `if (maybe_incremental_info) |inc| inc.base_slot == full_info.slot`.
pub fn fromFileInfos(
full_info: FullSnapshotFileInfo,
maybe_incremental_info: ?IncrementalSnapshotFileInfo,
Expand Down
1 change: 0 additions & 1 deletion src/rpc/lib.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pub const response = @import("response.zig");
pub const types = @import("types.zig");

pub const Client = client.Client;
pub const Server = server.Server;

pub const Request = request.Request;
pub const Response = response.Response;
Loading
Loading