Commit 1c2ace7e authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

closes[t:2659] fix the data race in the finish_primary_rows_internal function....

closes[t:2659] fix the data race in the finish_primary_rows_internal function.  found by cilkscreen ./brtloader-test-extractor -s

git-svn-id: file:///svn/toku/tokudb@20657 c7de825b-a66e-492c-adef-691d508d4ae1
parent 364621ba
......@@ -828,10 +828,10 @@ static int finish_primary_rows_internal (BRTLOADER bl)
if (ra==NULL) return errno;
cilk_for (int i = 0; i < bl->N; i++) {
struct rowset *rows = &(bl->rows[i]);
struct rowset rowi = bl->rows[i];
//printf("%s:%d extractor finishing index %d with %ld rows\n", __FILE__, __LINE__, i, rows->n_rows);
ra[i] = cilk_spawn sort_and_write_rows(*rows, &(bl->fs[i]), bl, i, bl->dbs[i], bl->bt_compare_funs[i]);
zero_rowset(rows);
ra[i] = cilk_spawn sort_and_write_rows(rowi, &(bl->fs[i]), bl, i, bl->dbs[i], bl->bt_compare_funs[i]);
zero_rowset(&bl->rows[i]);
}
// Implicit cilk_sync after that cilk_for loop.
......
......@@ -158,7 +158,11 @@ cilkscreen_brtloader-test-1: brtloader-test$(BINSUF)
cilkscreen ./$< dir.$@ $(SUMMARIZE_CMD)
cilkscreen_brtloader-test-extractor-1: brtloader-test-extractor$(BINSUF)
cilkscreen ./$< xdir.$@ $(SUMMARIZE_CMD)
cilkscreen_brtloader-test-extractor-2: brtloader-test-extractor$(BINSUF)
cilkscreen ./$< -s xdir.$@ $(SUMMARIZE_CMD)
cilkscreen_brtloader-test-extractor-3: brtloader-test-extractor$(BINSUF)
cilkscreen ./$< -s -r 100 --rowsets 100 xdir.$@ $(SUMMARIZE_CMD)
cilkscreen_brtloader-test-writer-1: brtloader-test-writer$(BINSUF)
cilkscreen ./$< -s -r 1000 dir.$@ $(SUMMARIZE_CMD)
......
Markdown is supported
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