Bug #21354
closedPossible bug in interval_set.intersect_of()
0%
Description
I've been working on different kind of optimization of pg_pool_t::build_removed_snaps (that gets rid of intersect interval set, saving time and memory as this itself isn't really needed for PGPool::update), when I realized that I get different results than expected. By backtracking, I managed to get same results by rollbacking https://github.com/ceph/ceph/pull/17088/commits/825470fcf9190c94422716454dbf11b24350a748 (actually, just commenting out a call to intersection_size_asym() is enough to make it produce correct results). I suspect it's buggy, but I'm not certain of that.
My test program and both expected and invalid output are here: http://ceph.predictor.org.pl/ceph_intersect_bug.txt
Can someone look into this and either point me to actual error in my code, or confirm my observations?