[PR #369] [MERGED] fix #368 #392

Closed
opened 2026-10-26 09:49:44 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/3FS/pull/369
Author: @yiyuanliu
Created: 12/26/2025
Status: ✅ Merged
Merged: 12/26/2025
Merged by: @yiyuanliu

Base: main ← Head: lyy/fix-shuffle


📝 Commits (1)

  • 468ce9b Implement deterministic shuffle with configurable g++/libstdc++ compatibility.

📊 Changes

6 files changed (+415 additions, -13 deletions)

View changed files

📝 CMakeLists.txt (+26 -0)
📝 README.md (+19 -9)
➕ src/common/utils/Shuffle.h (+208 -0)
📝 src/fbs/meta/Schema.cc (+6 -3)
📝 src/meta/components/ChainAllocator.h (+7 -1)
➕ tests/common/utils/TestShuffle.cc (+149 -0)

📄 Description

fix #368

Changes:

Added compile option SHUFFLE_METHOD with possible values: g++10, g++11, or stdshuffle (not recommended). The g++11 option is compatible with g++11 and later versions. You need to manually specify cmake -DSHUFFLE_METHOD='...' when compiling.

  • If you have already deployed a 3FS cluster, choose g++10 or g++11 based on the compiler version used when deploying that cluster.
  • If you are deploying a new 3FS cluster, you can choose either g++10 or g++11, but please note that you need to keep using the same configuration afterwards.

When creating files, 3FS meta now searches for a random seed that produces the same result on both g++10 and g++11. Since file stripe sizes are generally small, it is very easy to find a qualifying random seed.

Checking for affected files in mixed-version deployments:

If you have mixed g++10 and g++11+ binaries in a cluster, you can check whether any files have shuffle seeds that produce different results under different compilers:

  1. First use admin_cli to dump inode information:
    dump-inodes --fdb-cluster-file /path/to/fdb.cluster --parquet-format
    
  2. Use duckdb to extract file inode, shuffle seed and stripe size information:
    create table t as (select inode_id, inode_typeFile_layout_chainsChainRange_seed, inode_typeFile_layout_stripeSize from '*.parquet' where inode_typeFile_layout_chainsChainRange_seed != 0);
    copy (from t) to '~/dump-inodes.csv'
    
  3. Use the tool to check the results
    ./tests/test_common --gtest_filter='TestShuffle.CheckDump' --test_dump_path bug.csv 2> mismatch.csv
    

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/3FS/pull/369 **Author:** [@yiyuanliu](https://github.com/yiyuanliu) **Created:** 12/26/2025 **Status:** ✅ Merged **Merged:** 12/26/2025 **Merged by:** [@yiyuanliu](https://github.com/yiyuanliu) **Base:** `main` ← **Head:** `lyy/fix-shuffle` --- ### 📝 Commits (1) - [`468ce9b`](https://github.com/deepseek-ai/3FS/commit/468ce9b92bb433a5af510f17e5db938b78995a45) Implement deterministic shuffle with configurable g++/libstdc++ compatibility. ### 📊 Changes **6 files changed** (+415 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+26 -0) 📝 `README.md` (+19 -9) ➕ `src/common/utils/Shuffle.h` (+208 -0) 📝 `src/fbs/meta/Schema.cc` (+6 -3) 📝 `src/meta/components/ChainAllocator.h` (+7 -1) ➕ `tests/common/utils/TestShuffle.cc` (+149 -0) </details> ### 📄 Description fix #368 **Changes**: Added compile option `SHUFFLE_METHOD` with possible values: `g++10`, `g++11`, or `stdshuffle` (not recommended). The `g++11` option is compatible with `g++11` and later versions. You need to manually specify `cmake -DSHUFFLE_METHOD='...'` when compiling. - If you have already deployed a 3FS cluster, choose `g++10` or `g++11` based on the compiler version used when deploying that cluster. - If you are deploying a new 3FS cluster, you can choose either `g++10` or `g++11`, but please note that you need to keep using the same configuration afterwards. When creating files, 3FS meta now searches for a random seed that produces the same result on both `g++10` and `g++11`. Since file stripe sizes are generally small, it is very easy to find a qualifying random seed. **Checking for affected files in mixed-version deployments**: If you have mixed g++10 and g++11+ binaries in a cluster, you can check whether any files have shuffle seeds that produce different results under different compilers: 1. First use admin_cli to dump inode information: ``` dump-inodes --fdb-cluster-file /path/to/fdb.cluster --parquet-format ``` 2. Use duckdb to extract file inode, shuffle seed and stripe size information: ``` create table t as (select inode_id, inode_typeFile_layout_chainsChainRange_seed, inode_typeFile_layout_stripeSize from '*.parquet' where inode_typeFile_layout_chainsChainRange_seed != 0); copy (from t) to '~/dump-inodes.csv' ``` 3. Use the tool to check the results ``` ./tests/test_common --gtest_filter='TestShuffle.CheckDump' --test_dump_path bug.csv 2> mismatch.csv ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 09:49:44 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/3FS#392
No description provided.