Skip to content

Fix additional shred destinations #5997

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 1 commit 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
2 changes: 2 additions & 0 deletions src/app/fdctl/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,13 @@ fd_topo_initialize( config_t * config ) {
config->tiles.shred.additional_shred_destinations_retransmit[ i ],
&tile->shred.adtl_dests_retransmit[ i ] );
}
tile->shred.adtl_dests_retransmit_cnt = config->tiles.shred.additional_shred_destinations_retransmit_cnt;
for( ulong i=0UL; i<config->tiles.shred.additional_shred_destinations_leader_cnt; i++ ) {
parse_ip_port( "tiles.shred.additional_shred_destinations_leader",
config->tiles.shred.additional_shred_destinations_leader[ i ],
&tile->shred.adtl_dests_leader[ i ] );
}
tile->shred.adtl_dests_leader_cnt = config->tiles.shred.additional_shred_destinations_leader_cnt;

} else if( FD_UNLIKELY( !strcmp( tile->name, "store" ) ) ) {
tile->store.disable_blockstore_from_slot = config->development.bench.disable_blockstore_from_slot;
Expand Down
12 changes: 7 additions & 5 deletions src/disco/shred/fd_shred_tile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,24 +1052,26 @@ after_frag( fd_shred_ctx_t * ctx,
ulong max_dest_cnt[1];
fd_shred_dest_idx_t * dests;
if( FD_LIKELY( ctx->in_kind[ in_idx ]==IN_KIND_NET ) ) {
for( ulong i=0UL; i<k; i++ ) {
for( ulong j=0UL; j<ctx->adtl_dests_retransmit_cnt; j++ ) send_shred( ctx, stem, new_shreds[ i ], ctx->adtl_dests_retransmit+j, ctx->tsorig );
}
out_stride = k;
/* In the case of feature activation, the fanout used below is
the same as the one calculated/modified previously at the
begining of after_frag() for IN_KIND_NET in this slot. */
beginning of after_frag() for IN_KIND_NET in this slot. */
dests = fd_shred_dest_compute_children( sdest, new_shreds, k, ctx->scratchpad_dests, k, fanout, fanout, max_dest_cnt );
} else {
out_stride = 1UL;
*max_dest_cnt = 1UL;
dests = fd_shred_dest_compute_first ( sdest, new_shreds, k, ctx->scratchpad_dests );
for( ulong i=0UL; i<k; i++ ) {
for( ulong j=0UL; j<ctx->adtl_dests_leader_cnt; j++ ) send_shred( ctx, stem, new_shreds[ i ], ctx->adtl_dests_leader+j, ctx->tsorig );
}
out_stride = 1UL;
*max_dest_cnt = 1UL;
dests = fd_shred_dest_compute_first ( sdest, new_shreds, k, ctx->scratchpad_dests );
}
if( FD_UNLIKELY( !dests ) ) return;

/* Send only the ones we didn't receive. */
for( ulong i=0UL; i<k; i++ ) {
for( ulong j=0UL; j<ctx->adtl_dests_retransmit_cnt; j++ ) send_shred( ctx, stem, new_shreds[ i ], ctx->adtl_dests_retransmit+j, ctx->tsorig );
for( ulong j=0UL; j<*max_dest_cnt; j++ ) send_shred( ctx, stem, new_shreds[ i ], fd_shred_dest_idx_to_dest( sdest, dests[ j*out_stride+i ]), ctx->tsorig );
}
}
Expand Down
Loading