-
Notifications
You must be signed in to change notification settings - Fork 39
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
Epoch System #459
Epoch System #459
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quick pass over. a few nits mostly.
This is ready for final review and merge. @joemfb @belisarius222 @barter-simsum |
I think it's worth having the file extension to keep it separate from other
instances of "vere" in the codebase.
…On Tue, Jul 18, 2023 at 1:06 PM barter-simsum ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/vere/disk.c
<#459 (comment)>:
> +
+ u3_dire_free(die_u);
+
+ return ret_o;
+}
+
+/* u3_disk_epoc_vere: get binary version from epoch.
+*/
+c3_o
+u3_disk_epoc_vere(u3_disk* log_u, c3_d epo_d, c3_c* ver_w)
+{
+ struct stat buf_u;
+ c3_c* ver_c;
+ c3_w red_w, len_w;
+ c3_i ret_i, fid_i;
+ ret_i = asprintf(&ver_c, "%s/0i%" PRIc3_d "/vere.txt",
but why add .txt? I would just call it vere
—
Reply to this email directly, view it on GitHub
<#459 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV2DQRAZD3JF6TMLVOL6MU3XQ27ARANCNFSM6AAAAAAZIHMTTY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PMTS,N
@joemfb to reapprove |
Ravioli, ravioli, give me the formuoli! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will do
} | ||
|
||
return c3n; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing a trailing newline in this file
This PR cleans up the new epoch system from #459, fixing some small bugs, plugging leaks, and simplifying the interface to it. It still needs a final round of crash recovery testing (killing the process at every stage of the intialization/migration, confirming that subsequent restarts proceed as they should). Resolves #530.
This PR implements a new format for how piers store their event logs on disk.
Resolves #313.
Design
Existing format:
New format:
The new format introduces epochs, which are simply "slices" or "chunks" of a ship's complete event log. Above, you can see the ship's event log chunked into two epochs:
0i0
and0i132
.New ships booted with the code in this PR instantiate their
log
directories with the new format. Existing piers are automatically migrated on boot.Epoch "rollovers" (when the current epoch is ended and a new, empty epoch is created) occur under three conditions:
roll
subcommand to manually rollover.chop
subcommand.Both migrations and epoch rollovers ensure there's a current snapshot before running.
A few TODOs left:
Updateprep
commandchop
so it works when there are 3 epochs starting with0i0
Reproduce and fix partially-deleted epoch0i0
afterchop
chop
leave the latest two epochschk/
u3_disk_epoc_good()
is implemented and used how we wantu3_disk_epoc_init()
is implemented and used how we wanturbit play
andurbit
_pier_wyrd_init()
u3_disk_init()
auto-migrateinfo
cram
queu
meld
pack
play
chop
roll
u3_mars_play()
./urbit roll zod
with an updated binary version and an empty latest epoch, it does not roll but instead just updates thevere.txt
file