-
Notifications
You must be signed in to change notification settings - Fork 165
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
GH-5059 remove calls to E(...) when the return value is already being checked #5066
Conversation
@kenwenzel I've removed all the calls to E(...) where the return value was already being checked. Take a look if you can and feel free to merge if you are happy with everything. You can also create a release if you want, if not then I might have time the week of the 8th of July. |
ad3a1a3
to
935f515
Compare
Thank you. However, it helped us to find the empty key issue in the ValueStore. I will try to change that part to prevent looking up empty keys. |
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.
We could keep the checks for the put methods to detect any MDB_MAP_FULL errors.
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 don't have access to my computer for a good week. Feel free to modify the PR and merge when you're happy with it. Otherwise I'll look at it when I'm back.
@@ -126,7 +126,7 @@ private synchronized boolean update(Object element, boolean add) throws IOExcept | |||
keyVal.mv_data(keyBuf); | |||
|
|||
if (add) { | |||
if (E(mdb_put(factory.writeTxn, dbi, keyVal, dataVal, MDB_NOOVERWRITE)) == MDB_SUCCESS) { |
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.
revert this to some degree
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 added some simple retry logic to this one.
@@ -873,14 +873,14 @@ public boolean storeTriple(long subj, long pred, long obj, long context, boolean | |||
return recordCache.storeRecord(quad, explicit); | |||
} | |||
|
|||
int rc = E(mdb_put(writeTxn, mainIndex.getDB(explicit), keyVal, dataVal, MDB_NOOVERWRITE)); |
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.
revert this to some degree
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 is actually checked right below.
GitHub issue resolved: #5059
Briefly describe the changes proposed in this PR:
PR Author Checklist (see the contributor guidelines for more details):
mvn process-resources
to format from the command line)