10000 [R2] CommitLag Metric + Follower State by maierlars · Pull Request #14725 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@maierlars
Copy link
Contributor

Scope & Purpose

Add two new metrics to the log status:

  • CommitLag: difference in miliseconds of the insert timepoint of the first uncommitted entry in the log and now.
  • Follower State: Reports if the follower is up-to-date, error-backoff (including retryCount and time until retry), request-in-flight (including time passed since request was sent)

@maierlars maierlars self-assigned this Sep 2, 2021
@maierlars maierlars marked this pull request as ready for review September 3, 2021 15:04
@maierlars maierlars changed the base branch from feature/replication-2.0 to feature/replication-2.0-pr September 7, 2021 07:31
Comment on lines 448 to 449
}
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
});
}
});

};
struct FollowerStatistics : LogStatistics {
AppendEntriesErrorReason lastErrorReason;
double lastRequestLatencyMS;
Copy link
Contributor

Choose a reason for hiding this comment

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

How about we make this a std::chrono::duration<double, std::milli>?


struct UpToDate {};
struct ErrorBackoff {
double durationMS;
Copy link
Contributor

Choose a reason for hiding this comment

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

How about we make this a std::chrono::duration<double, std::milli>?

std::size_t retryCount;
};
struct RequestInFlight {
double durationMS;
Copy link
Contributor

Choose a reason for hiding this comment

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

How about we make this a std::chrono::duration<double, std::milli>?

LogTerm term;
std::unordered_map<ParticipantId, FollowerStatistics> follower;
// now() - insertTP of last uncommitted entry
double commitLagMS;
Copy link
Contributor

Choose a reason for hiding this comment

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

How about we make this a std::chrono::duration<double, std::milli>?

@maierlars maierlars merged commit 7ebfd36 into feature/replication-2.0-pr Sep 9, 2021
@maierlars maierlars deleted the feature/replication-2.0-commit-lag-follower-state branch September 9, 2021 07:45
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.

4 participants

0