fix: return trie if child is nil during compact to avoid nil-pointer panic#42
Conversation
|
Hi @AtakanPehlivanoglu , thanks for your contribution. Can you add a test that panics on the current branch, but is fixed by our change? Thanks. |
|
Hello @tchap, I have added a simple unit test to prove the mitigation and show how this problem can happen: 1. Test Run Without Mitigation2. Test Run With Mitigation |
|
Yeah, but I want to see a test using the public API. Surely you can break it using private methods. In reality I don't see how you would end up calling |
|
Totally agree that this is not reproducible with using the Public API but in our use case, this happens probably due to race condition and it rarely happens like once in a month. Thank you |
|
Normally I wouldn't merge this as I still don't understand how this is happening to you, but I don't have time to dig into this deeper, so I will merge it. |
Issue link
#41