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

raft: add tracing to raft #131850

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on Oct 16, 2024

  1. kvserver: protect the ProposalData context

    Previously the proposal data context could be updated and read outside
    of any locking. This normally didn't cause any problems as it was
    infrequenty read and only updated once, however it was incorrect. It
    needs to be protected by an atomic reference.
    
    Epic: none
    
    Release note: None
    andrewbaptist committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    33f2e7c View commit details
    Browse the repository at this point in the history
  2. raft: add tracing to RaftMessageRequest protobuf

    Adds tracing fields to allow tracing a Raft message over the wire.
    
    Fixes: cockroachdb#104035
    
    Release note: None
    andrewbaptist committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    71c9412 View commit details
    Browse the repository at this point in the history
  3. raft: make DescribeTarget accessible

    Previously describeTarget was only accessible from within the raft
    package. Making it public helps with debuggability of Raft Entries
    outside of Raft.
    
    Fixes: cockroachdb#104035
    
    Release note: None
    andrewbaptist committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    e3644e0 View commit details
    Browse the repository at this point in the history
  4. tracing: make trace and span ids redactable

    The trace and span ids can be used for out of band tracing. We don't
    want those to be redacted.
    
    Epic: none
    
    Release note: None
    andrewbaptist committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    e229ce0 View commit details
    Browse the repository at this point in the history
  5. raft: make raft enums redactable

    The raft types are enums that can't contain unsafe data. Making them
    SafeValue allows using them more easily for logging without a
    risk of them being redacted in important lines.
    
    Epic: none
    
    Release note: None
    andrewbaptist committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    9147190 View commit details
    Browse the repository at this point in the history
  6. raft: add a raft tracing library

    This change adds a tracing library for raft messages. Specifically it
    allows registering an entry either directly or due to a remote raft
    message and then possibly tracing the message at various key points.
    When the message is finally unregistered, it will dump the trace to the
    log. Additionally, on a local message, it will add the trace to the
    context that is passed in.
    
    Fixes: cockroachdb#104035
    
    Release note: None
    andrewbaptist committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    866740a View commit details
    Browse the repository at this point in the history
  7. raft: add tracing to important raft points

    This commit adds tracing to the various places within raft where state
    transitions happen. When a message is first proposed, it matches the
    context of the original message to the raft entry and registers it for
    tracing. Then it adds to the trace at the key points during the
    transitions and finally stops tracing once a `MsgStorageApplyResp` is
    received past the entry.
    
    Fixes: cockroachdb#104035
    
    Release note: None
    andrewbaptist committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    7869069 View commit details
    Browse the repository at this point in the history
  8. roachtest: enable raft tracing for perturbation/* tests

    Since raft tracing is not enabled by default, the perturbation tests
    enable it. This can be removed if we later make raft tracing enabled.
    
    Epic: none
    
    Release note: None
    andrewbaptist committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    0c7e4fa View commit details
    Browse the repository at this point in the history