Sync active request byrange ids logs#6869
Closed
dapplion wants to merge 4 commits intosigp:sync-active-request-byrangefrom
Closed
Sync active request byrange ids logs#6869dapplion wants to merge 4 commits intosigp:sync-active-request-byrangefrom
dapplion wants to merge 4 commits intosigp:sync-active-request-byrangefrom
Conversation
jxs
reviewed
Jan 27, 2025
Member
jxs
left a comment
There was a problem hiding this comment.
HI Lion, overall looks good to me, left some suggestions!
| ); | ||
|
|
||
| let processor = self.clone(); | ||
| let id = process_id.clone(); |
Member
There was a problem hiding this comment.
nit: we can avoid cloning here, we can make ChainSegmentProcessId derive Copy
| method: &'static str, | ||
| resp: Option<RpcResponseResult<R>>, | ||
| peer_id: PeerId, | ||
| get_count: F, |
Member
There was a problem hiding this comment.
why not just accept the count as an usize?
Collaborator
Author
There was a problem hiding this comment.
Because I want to render the count of items in the Ok response
b0774e0 to
8e0758c
Compare
Member
|
Tests are failing. |
Collaborator
Author
|
Let's wait to merge |
Member
|
@dapplion this PR got closed due to base branch being deleted, would you mind re-opening this against |
mergify bot
pushed a commit
that referenced
this pull request
Feb 10, 2025
- Re-opened PR from #6869 Writing and running tests I noted that the sync RPC requests are very verbose now. `DataColumnsByRootRequestId { id: 123, requester: Custody(CustodyId { requester: CustodyRequester(SingleLookupReqId { req_id: 121, lookup_id: 101 }) }) }` Since this Id is logged rather often I believe there's value in 1. Making them more succinct for log verbosity 2. Make them a string that's easy to copy and work with elastic Write custom `Display` implementations to render Ids in a more DX format _ DataColumnsByRootRequestId with a block lookup_ ``` 123/Custody/121/Lookup/101 ``` _DataColumnsByRangeRequestId_ ``` 123/122/RangeSync/0/5492900659401505034 ``` - This one will be shorter after #6868 Also made the logs format and text consistent across all methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Addressed
Writing and running tests I noted that the sync RPC requests are very verbose now.
DataColumnsByRootRequestId { id: 123, requester: Custody(CustodyId { requester: CustodyRequester(SingleLookupReqId { req_id: 121, lookup_id: 101 }) }) }Since this Id is logged rather often I believe there's value in
Proposed Changes
Write custom
Displayimplementations to render Ids in a more DX format_ DataColumnsByRootRequestId with a block lookup_
DataColumnsByRangeRequestId
Also made the logs format and text consistent across all methods