@@ -1239,20 +1239,6 @@ class MergeTreeData : public IStorage, public WithMutableContext
12391239 // / under lockForShare if rename is possible.
12401240 String relative_data_path;
12411241
1242- // / RAII Wrapper for atomic work with currently moving parts
1243- // / Acquire them in constructor and remove them in destructor
1244- // / Uses data.currently_moving_parts_mutex
1245- struct CurrentlyMovingPartsTagger
1246- {
1247- MergeTreeMovingParts parts_to_move;
1248- MergeTreeData & data;
1249- CurrentlyMovingPartsTagger (MergeTreeMovingParts && moving_parts_, MergeTreeData & data_);
1250-
1251- ~CurrentlyMovingPartsTagger ();
1252- };
1253-
1254- using CurrentlyMovingPartsTaggerPtr = std::shared_ptr<CurrentlyMovingPartsTagger>;
1255-
12561242private:
12571243 // / Columns and secondary indices sizes can be calculated lazily.
12581244 mutable std::mutex columns_and_secondary_indices_sizes_mutex;
@@ -1687,7 +1673,19 @@ class MergeTreeData : public IStorage, public WithMutableContext
16871673 DataPartsVector * out_covered_parts,
16881674 bool rename_in_transaction);
16891675
1676+ // / RAII Wrapper for atomic work with currently moving parts
1677+ // / Acquire them in constructor and remove them in destructor
1678+ // / Uses data.currently_moving_parts_mutex
1679+ struct CurrentlyMovingPartsTagger
1680+ {
1681+ MergeTreeMovingParts parts_to_move;
1682+ MergeTreeData & data;
1683+ CurrentlyMovingPartsTagger (MergeTreeMovingParts && moving_parts_, MergeTreeData & data_);
1684+
1685+ ~CurrentlyMovingPartsTagger ();
1686+ };
16901687
1688+ using CurrentlyMovingPartsTaggerPtr = std::shared_ptr<CurrentlyMovingPartsTagger>;
16911689
16921690 // / Moves part to specified space, used in ALTER ... MOVE ... queries
16931691 std::future<MovePartsOutcome> movePartsToSpace (const CurrentlyMovingPartsTaggerPtr & moving_tagger, const ReadSettings & read_settings, const WriteSettings & write_settings, bool async);
0 commit comments