-
Notifications
You must be signed in to change notification settings - Fork 123
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again an impressive amount of work and progress! 😲
The code is well structured and not too hard to get into.
Good documentation and lots of tests are present.
Keep up that great work! 👍
My findings are available in the comments below.
I'll make a 2nd review when this PR is ready to merge.
Does anyone have an idea how to debug the test issues on Cirrus CI? There are a ton of shell tests that fail with the following error:
It looks fishy that the second parenthesis is empty. The elektra version number should be present there. It is read from |
jenkins build libelektra please |
Ah okay, for future reference: The install script didn't complete because it couldn't find the man page for |
98cdae1
to
ad68ed9
Compare
jenkins build libelektra please |
8 similar comments
jenkins build libelektra please |
jenkins build libelektra please |
jenkins build libelektra please |
jenkins build libelektra please |
jenkins build libelektra please |
jenkins build libelektra please |
jenkins build libelektra please |
jenkins build libelektra please |
@flo91 @markus2330 The test program What's even weirder is I've enabled See for example the output for
And now the output of
|
0d50bb2
to
91f27e1
Compare
Oh wow, that was a truly multi-level bug cascade. But everything seems to work now 😁. |
jenkins build libelektra please |
1 similar comment
jenkins build libelektra please |
jenkins build libelektra please |
Co-authored-by: Markus Raab <[email protected]>
jenkins build libelektra please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few suggestions for the docs
doc/help/kdb-record-start.md
Outdated
|
||
Note: when you activate session recording, concurrency of Elektra will be somewhat limited. | ||
As long as it is active, a global lock will be created to ensure no two processes will write data simultaneously. | ||
This behavior is similar as to when multiple processes will write to the same configuration file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behavior is similar as to when multiple processes will write to the same configuration file. | |
The errors reports to applications in such cases are similar to when multiple processes write to the same configuration file. |
One more thing, you should add |
…ent with terminology
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outstanding and comprehensive work done here! 🎉
The contribution is well structured, well documented and includes lots of test cases. 👍🏻
I've just found a few small mistakes and have a few questions.
This PR got already merged during my review, but it shouldn't be a problem to create a follow-up PR where you incorporate these changes to improve the already high quality of your contribution even a bit more.
Additionally, it would be great if you find time to also review my PR for the ODBC backend: #4915
Thank you!
this key denotes the parent key of the session. Only changes same of | ||
below this key will be recorded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this key denotes the parent key of the session. Only changes same of | |
below this key will be recorded. | |
this key denotes the parent key of the session. | |
Only changes of this key and below this key will be recorded. |
A recording session is a period of time during which changes to the Key Database (KDB) are tracked and accumulated. | ||
It begins when recording starts and ends when recording stops. | ||
Throughout the recording session, all changes made to the KDB are recorded, including additions, modifications, and deletions of keys and their associated values. | ||
The recording session provides a complete audit trail of all changes made to the KDB during the specified period of time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recording session provides a complete audit trail of all changes made to the KDB during the specified period of time. |
The same sentence that you already removed from doc/help/elektra-glossary.md after the review from @kodebach.
Used for the session recording plugin. | ||
Hard coded to search for a plugin named `recorder`. | ||
|
||
The following function must be exported: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following function must be exported: | |
The following functions must be exported: |
- Signature: `int (Plugin * handle, Key * parentKey)` | ||
- Called in `kdbSet` before the storage phase. | ||
- The `parentKey` must not be modified, except for adding errors and warnings. | ||
- Must ensure that this is only process that can record changes until `unlock` is called. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Must ensure that this is only process that can record changes until `unlock` is called. | |
- Must ensure that this is the only process that can record changes until `unlock` is called. |
- **recording session**: | ||
A recording session is a period of time during which changes to the Key Database (KDB) are tracked and accumulated. | ||
It begins when recording starts and ends when recording stops. | ||
Throughout the recording session, all changes made to the KDB are recorded, including additions, modifications, and deletions of keys and their associated values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throughout the recording session, all changes made to the KDB are recorded, including additions, modifications, and deletions of keys and their associated values. | |
Throughout the recording session, all changes made to the KDB are recorded, including additions, modifications, and deletions of keys and their associated values and metadata. |
EXPECT_EQ (diffWithDifferences.isEmpty (), false); | ||
EXPECT_EQ (diffWithoutDifferences.isEmpty (), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be replaced with EXPECT_FALSE
resp. EXPECT_TRUE
.
ksDel (ksCut (toRecord, ksAtCursor (blacklistedKeys, it))); | ||
} | ||
|
||
if (ksGetSize (toRecord) == 0 && ksGetSize (newKeys) != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the 2nd condition (ksGetSize (newKeys) != 0
) really necessary here?
Maybe you could also add the check for an empty KeySet newKeys
at the beginning of this function (after the NULL-pointer checks).
return successful; | ||
} | ||
|
||
bool elektraRecordGetDiff (KDB * handle, ElektraDiff ** diff, Key * errorKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation is missing for this function.
return ks; | ||
} | ||
|
||
bool elektraRecordExportSession (KDB * handle, Plugin * plugin, Key * parentKey, Key * errorKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation is also missing for this function.
// We need to duplicate the ks, as `getDiffFromSessionStorage` will remove it from sessionStorage | ||
sessionStorageBackup = ksDup (ksBelow (sessionStorage, sessionKey)); | ||
|
||
// Remove all keys from session storage that are not initiall under parent key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"initiall" -> "initially"
Basics
(added as entry in
doc/news/_preparation_next_release.md
which contains_(my name)_
)Please always add them to the release notes.
(first line should have
module: short statement
syntax)close #X
, are in the commit messages.doc/news/_preparation_next_release.md
scripts/dev/reformat-all
Checklist
(not in the PR description)
Review
Labels