-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
storage/disk: try fix for bader error «txn is too big to fit into one… #3880
storage/disk: try fix for bader error «txn is too big to fit into one… #3880
Conversation
3b871b1
to
fc23131
Compare
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.
Thanks a lot again, this is great. There are a few things to take care of, but let's fix this bug 💯
eb3dd98
to
94490c0
Compare
Hi, Tanks for your review. I made correction.
ps:
|
94490c0
to
25629e2
Compare
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.
Just some nitpicks, let's get this merged and take it from there 👍 Thanks again for looking into this and bearing with me.
hi Thanks for pertinent feedback. i made change, but there is one question in suspend (writed in PS.2 of my previous comment) and i would be sure about what should be test: unit (non regression) test should assert no key are lost ? ( I wonder if it's badger or OPA reponsability to check that when this error occured.) |
It think it would make sense to have some read-back to assert what's been stored under this condition. After all, it's not obvious to me: if the txn was too big, and we commit it, did it discard stuff or still work...? That aside, thanks for bearing with me on all the comments 👍 |
i think too. it's better to assert the state is ok by read what is inserted. if it's ok for you, i should add this test for assert no key are lost and i repush the test with new assert. I await your a approvement for doing this assert :) |
@floriangasc thank you! sounds like a good way forward. |
the test of read catch a very not cool bug. I will come back to you when i will have resolved the bug: some keys are lost, and there is a problem with re-assign the txn in the disk store. I study the code now. May be there will be some question. |
@floriangasc I've converted this to draft, feel free to click "ready for review" when it's time! |
d9b1eb4
to
fa86ba8
Compare
Hi. i have done with test «no lost key». The explanation of the previous message:
At the end
|
hi, For the P.R there are some points which must be treated with attention
|
What is the next step ? |
We'll get this reviewed and merged 😄 can you also please squash the commits? One should be fine. |
Also getting the tests green would be great. |
Great. i doing this monday! |
905be3a
to
b8e8836
Compare
storage/disk/txn_test.go
Outdated
} | ||
actualNbKeys := len(result.(map[string]interface{})) | ||
if nbKeys != actualNbKeys { | ||
t.Fatalf("Unexpected <~nbKeys: " + strconv.Itoa(nbKeys) + " ~> read whereas <~actualNbKeys: " + strconv.Itoa(actualNbKeys) + "~> inserted") |
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.
[nit]
t.Fatalf("Unexpected <~nbKeys: " + strconv.Itoa(nbKeys) + " ~> read whereas <~actualNbKeys: " + strconv.Itoa(actualNbKeys) + "~> inserted") | |
t.Fatalf("Expected %d keys, read %d", nbKeys, actualNbKeys) |
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, fixed.
b8e8836
to
3c48577
Compare
bfe08b4
to
a74e74b
Compare
All checks have passed \o/\o/ :) |
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 getting close, thanks for bearing with me. One more question re: the delete case, and a small nitpick. I think this is the last round 🤞
4985d46
to
05efce2
Compare
… non regression test Signed-off-by: Gasc Florian <florian.gasc@gmail.com>
05efce2
to
54787cf
Compare
Hi, @srenatus Just for be sure if i have done a good job and all it's ok ? |
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. Thanks again!
Fixes #open-policy-agent#3879. Signed-off-by: Gasc Florian <florian.gasc@gmail.com> Signed-off-by: Dolev Farhi <farhi.dolev@gmail.com>
… request»
runtime: unlock choice before disk and in memory storage
Signed-off-by: Gasc Florian florian.gasc@gmail.com
Fixes #3879