Commit 6922005a authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

make update of s->maxdepth atomic.

parent a35e49bb
......@@ -1253,7 +1253,9 @@ void space_split_mapper(void *map_data, int num_elements, void *extra_data) {
struct xpart *xparts = c->xparts;
/* Check the depth. */
if (c->depth > s->maxdepth) s->maxdepth = c->depth;
while (c->depth > (maxdepth = s->maxdepth)) {
atomic_cas(&s->maxdepth, maxdepth, c->depth);
}
/* Split or let it be? */
if (count > space_splitsize || gcount > space_splitsize) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment