-
Notifications
You must be signed in to change notification settings - Fork 976
auth lmdb: full support for comments #16522
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
base: master
Are you sure you want to change the base?
Conversation
| // whether to include disabled records in the results | ||
| bool includedisabled; | ||
| // whether we are doing comments (false=records, true=comments) | ||
| bool comments; |
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.
Maybe prefer putting a pointer to the *dbi to use here rather than a bool? Might not be as simple as it looks.
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 we'd have to compare dbi pointers in getInternal, because the logic is different for comments vs. records (which I am unhappy about but I haven't found a clean refactor for it yet)
| "\tUnpublish the zone key with key id KEY_ID in ZONE"}}} | ||
| }; | ||
|
|
||
| static const groupCommandDispatcher commentCommands{ |
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.
I thought this would be part of the rrset commands. As in rrset add-comment, rrset list-comment, rrset forget-comment, rrset why-the-hell-did-I-forget-to-put-a-comment, etc.
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.
makes perfect sense
Pull Request Test Coverage Report for Build 19674913787Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
| { | ||
| DomainInfo info; | ||
| if (!findDomain(domain_id, info)) { | ||
| throw DBException("Domain with id '" + std::to_string(domain_id) + "not found"); |
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.
| throw DBException("Domain with id '" + std::to_string(domain_id) + "not found"); | |
| throw DBException("Domain with id '" + std::to_string(domain_id) + "' not found"); |
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.
or no quotes..
| d_lookupstate.comment.content = message.get_string(); | ||
| } | ||
| catch (protozero::exception& e) { | ||
| // very little we can do about this |
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.
| // very little we can do about this | |
| throw DBException("got invalid serialized comment: " + e.what()); |
or
| // very little we can do about this | |
| throw; |
and handle protozero::exception in the caller (which is probably not a good idea - better wrap in a DBException or PDNSException).
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.
throw DBException("got invalid serialized comment: " + e.what());
on my current database (which was written by previous versions of this branch) this would throw immediately. However, I should just clean that up, and then we can throw. Ok, agreed.
This reverts commit c796957.
Short description
WIP. TODO:
pdnsutil comment add example.com foobar A 'hello protobuf' petre->Error: std::string keyConv(const T&) [with T = DNSName; typename std::enable_if<std::is_same<T, DNSName>::value, T>::type* <anonymous> = 0; std::string = std::__cxx11::basic_string<char>] Attempt to serialize an unset DNSNameChecklist
I have: