Skip to content

What is best practice to write to audit log? #27

Answered by sakno
natilivni asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @natilivni

In context of custom database please examine this article first.

Issue #5 is no longer relevant because support of 1.x branch has been dropped since 12/20/2020. The currently supported 2.x branch doesn't have this method because WriteConcern was removed as a part of the simplification. WriteAsync was introduced to ensure that the written log entry is committed by the majority of nodes. Now it's a responsibility of audit log itself. If you need to add a new log entry then do the following calls.

  1. IPersistentState.AppendAsync to add log entries in uncommitted state to the log, save the returned entry index
  2. Optionally, IReplicationCluster<IRaftLogEntry>.ForceReplicationAsync to…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by natilivni
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants