-
Notifications
You must be signed in to change notification settings - Fork 95
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
Issue 6430 - implement read-only bdb #6431
base: main
Are you sure you want to change the base?
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.
The overall looks good. Few comments
#include "bdb_layer.h" | ||
#include <robdb.h> | ||
|
||
#define DEBUG 1 |
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.
Shouldn't it be 0 by default
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.
should not even be defined at all (since we are using #ifdef)
{ | ||
int rc = bdbreader_cur_lookup(db->cur->impl, key->data, key->size); | ||
if (rc == DB_SUCCESS) { | ||
rc = dbc_get(db->cur, key, data, flags); |
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.
Shouldn't it call db->cur->c_get than dbc_get ?
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.
db->cur->c_get == dbc_get so it does not really matter.
But to respect the layered approach since we are in the glue code that maps bdb API to robdb API,
bdb_bdbreader_glue.c code should use either internal or librobdb function rather than the bdb API
(So dbc_get looks good.)
@@ -397,6 +397,7 @@ const char *dblayer_op2str(dbi_op_t op) | |||
return str[idx]; | |||
} | |||
|
|||
<<<<<<< HEAD |
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.
Probably a leftover from a merge.
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.
Indeed: bad conflict resolution when rebasing to main ...
|
||
int dbc_close(DBC *dbc) | ||
{ | ||
bdbreader_bdb_close(dbc->impl); |
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.
Did you mean bdbreader_cur_close ?
Fixed review cooments about DEBUG, bdbreader_cur_close, and rebase conflict issue |
rpm/389-ds-base.spec.in
Outdated
@@ -540,11 +582,11 @@ if ! make DESTDIR="$RPM_BUILD_ROOT" check; then cat ./test-suite.log && false; f | |||
|
|||
%post | |||
if [ -n "$DEBUGPOSTTRANS" ] ; then | |||
output=$DEBUGPOSTTRANS |
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.
Indentation was removed here and below, is this intentional?
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.
Good catch!
lib/librobdb/robdb.spec
Outdated
Summary: Provide basic functions to search and read Berkeley Database records | ||
|
||
License: GPL-2.0-or-later | ||
URL: https://github.com/389ds/389-ds-base/lib/librobdb |
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.
Broken URL
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.
That is expected:
Right now, lib/librobdb does not exists yet on main branch, but it will exist once the PR get merged.
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.
Then it would be something like this (note the tree
and main
branch in the URL):
https://github.com/389ds/389-ds-base/tree/main/lib/librobdb
%doc %{_defaultdocdir}/%{name}-devel/README.md | ||
%{_libdir}/*.so | ||
%{_includedir}/* | ||
|
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.
Since there is test.c for robdb, maybe we should run it as part of %check
section?
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.
Added a make localtest to be able to run the test without having to install the rpm first
and added a %check section to use it
Pushed commit about Viktor's review comments |
Pushed new commit to fix the URL |
This PR:
Issue: #6430
Reviewed by: @tbordaz and @vashirov (Thanks)