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

[pull] master from netdata:master #283

Merged
merged 5 commits into from
Jan 10, 2025
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 10, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

New Features:

  • Added a new metrics-cardinality API function that shows metrics cardinality per context across all nodes, including online and offline metrics, nodes, and instances, as well as the ephemerality percentage which represents the percentage of offline metrics.

@pull pull bot added the ⤵️ pull label Jan 10, 2025
@pull pull bot merged commit a553390 into webfutureiorepo:master Jan 10, 2025
Copy link

sourcery-ai bot commented Jan 10, 2025

Reviewer's Guide by Sourcery

This pull request increases the timeout for replication progress from 5 minutes to 10 minutes and adds a new API function to calculate metrics cardinality.

Sequence diagram for stream replication progress check

sequenceDiagram
    participant Sender
    participant Receiver
    Note over Sender,Receiver: Replication progress check every 10 mins (increased from 5)
    Sender->>Sender: Check replication progress
    alt Progress detected
        Sender->>Sender: Reset last_checked_ut
    else No progress & not checked
        Sender->>Sender: Count stalled & finished instances
        alt Has stalled instances
            Sender->>Receiver: Disconnect to restore streaming
        end
        Sender->>Sender: Update last_checked_ut
    end
Loading

Class diagram for stream state changes

classDiagram
    class sender_state {
        +replication: struct
        +last_progress_ut: usec_t
        +last_checked_ut: usec_t
    }
    class receiver_state {
        +replication: struct
        +last_progress_ut: usec_t
        +last_checked_ut: usec_t
    }
    note for sender_state "Added last_checked_ut field"
    note for receiver_state "Added last_checked_ut field"
Loading

File-Level Changes

Change Details Files
Increased replication progress timeout
  • Changed the timeout for replication progress check from 5 minutes to 10 minutes in both the sender and receiver.
  • Added last_checked_ut to track the last time the replication progress was checked to avoid redundant checks.
src/streaming/stream-receiver.c
src/streaming/stream-sender.c
src/streaming/stream-receiver-internals.h
src/streaming/stream-sender-internals.h
Added metrics cardinality API function
  • Added a new API function metrics-cardinality to calculate and return metrics cardinality per context across all nodes.
  • The new function returns a JSON table with the number of nodes, instances, and metrics for each context, including online and offline counts.
  • Added CMake build rules for the new API function files.
src/web/api/functions/functions.c
src/web/api/functions/functions.h
src/web/api/functions/function-metrics-cardinality.c
src/web/api/functions/function-metrics-cardinality.h
CMakeLists.txt
Improved handling of unreferenced data collection contexts
  • Added a check for handle->pdc before stopping workers and releasing the data collection context to prevent potential issues with unreferenced contexts.
src/database/engine/rrdengineapi.c

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant