Commit 6426223
Fix Race Condition in Stats Aggregation During Parallel Encoding with Chunking (facebookincubator#357)
Summary:
Pull Request resolved: facebookincubator#357
This diff addresses a data race condition introduced by a recent refactoring in the handling of column stats objects for individual streams. Previously, the creation and access of column stats objects for individual streams were moved inside a barrier as [part of a refactor.](https://www.internalfb.com/diff/D88053111?entry_point=19) However, that change inadvertently introduced a data race, as multiple threads could concurrently create or access these objects without proper synchronization. This issue was detected by our TSAN (ThreadSanitizer) tests, which reported failures due to the race condition. This diff ensures that the creation and access of column stats objects are properly synchronized within the barrier, eliminating the data race. As a result, TSAN tests now pass, confirming that the concurrency issue has been resolved.x
Reviewed By: xiaoxmeng
Differential Revision: D88445993
fbshipit-source-id: 9cc8ecf39020fbfc2f1d06c077f1a45195e7bfbe1 parent ba36073 commit 6426223
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
993 | 993 | | |
994 | 994 | | |
995 | 995 | | |
996 | | - | |
997 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
998 | 1001 | | |
999 | 1002 | | |
1000 | 1003 | | |
1001 | 1004 | | |
1002 | 1005 | | |
1003 | | - | |
1004 | | - | |
| 1006 | + | |
| 1007 | + | |
1005 | 1008 | | |
1006 | 1009 | | |
1007 | 1010 | | |
| |||
0 commit comments