Skip to content

Effect of removing std::uncaught_exceptions calls on OL obsoleting critical section enter and exit

Laurynas Biveinis edited this page Apr 22, 2021 · 5 revisions

The initial OLC ART implementation introduced unique_write_lock_obsoleting_guard class that took a write-locked lock in constructor and in destructor decided whether to write unlock and obsolete on normal path or just write unlock on error path by comparing std::uncaught_exceptions results in constructor and destructor. This did not work out due to guard lifetime extending beyond their variable scope due to copy elision (?) and I had to introduce explicit commit and abort calls, removing the need for decision in destructor, thus making std::uncaught_exceptions calls redundant.

Removing them has beneficial performance effect. Node4 microbenchmarks: ~2% slowdown (large Node4 tree random gets) to ~7% (sequential insert to full Node4) speedup

Clone this wiki locally