Skip to content

Commit 01c6720

Browse files
committed
fix(fs): simplify external path position update
1 parent a4ede5f commit 01c6720

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/paimon/common/fs/external_path_provider.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ class ExternalPathProvider {
4646
///
4747
/// @return the next external data path
4848
std::string GetNextExternalDataPath(const std::string& file_name) {
49-
size_t position =
50-
(position_.fetch_add(1, std::memory_order_relaxed) + 1) % external_table_paths_.size();
49+
size_t position = (++position_) % external_table_paths_.size();
5150
return PathUtil::JoinPath(
5251
PathUtil::JoinPath(external_table_paths_[position], relative_bucket_path_), file_name);
5352
}

0 commit comments

Comments
 (0)