Skip to content

belt sanding stream_writer #5152

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

Open
wants to merge 2 commits into
base: ripatel/snapshot-tiles-wip
Choose a base branch
from

Conversation

ripatel-fd
Copy link
Contributor

No description provided.


writer->cons_cnt = 0UL;
writer->cons_max = cons_max;
/* writer->out_sync already set */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda confused where out_sync gets set... I probably missed it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nvm I found it lol

}

int err = fd_io_istream_snapshot_http_read( ctx->http, out, dst_max, &sz );
while( out_cur<out_end ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh smart... so we can set a frag_sz_max for the stream writer and repeatedly fill up to frag_sz_max with calls to fd_io_istream_snapshot_http_read which is capped at the size of the HTTP resp buffer.


for(;;) {
uchar const * prev = cur;
while( out_cur<out_end ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And same here, nice!

ulong * cons_seq; /* cons_seq[ 2*cons_idx+i ] caches cons_fseq[ cons_idx ][i] */
ulong volatile ** cons_fseq; /* cons_fseq[ cons_idx ] points to consumer fseq */
/* Each consumer reports a 'frag sequence number' and the 'stream offset' */
# define FD_STREAM_WRITER_CONS_SEQ_STRIDE 2UL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm why the define in the middle of the stream writer struct?

@ripatel-fd ripatel-fd force-pushed the ripatel/snapshot-restore-beltsanding branch 3 times, most recently from 1f61afc to 60a9ad8 Compare May 16, 2025 21:21
@ripatel-fd ripatel-fd force-pushed the ripatel/snapshot-restore-beltsanding branch from 60a9ad8 to ec0003d Compare May 16, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants