You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INFO:partition:Table dogs planned SQL: ALTER TABLE `dogs` REORGANIZE PARTITION `p_20201204` INTO (PARTITION `p_20210422` VALUES LESS THAN (221), PARTITION `p_20210522` VALUES LESS THAN MAXVALUE);
@@ -53,7 +53,7 @@ dogs:
53
53
→ python3 -m pip install --editable .
54
54
→ partition-manager --log-level=debug \
55
55
--mariadb test_tools/fake_mariadb.sh \
56
-
add --noop --table tablename
56
+
maintain --noop --table tablename
57
57
DEBUG:root:Auto_Increment column identified as id
58
58
DEBUG:root:Partition range column identified as id
59
59
DEBUG:root:Found partition before = (100)
@@ -110,10 +110,10 @@ orders:
110
110
111
111
- At start, if any configuration file specified as a CLI argument, read that configuration file to set all other values.
112
112
- Then, process all remaining command line arguments, overriding values loaded from the configuration file in case of conflicts.
113
-
- From those command-line arguments, determine whether to collect statistics `stats`, determine an initial partition layout `bootstrap`, or operate in the normal `add` mode.
113
+
- From those command-line arguments, determine whether to collect statistics `stats`, determine an initial partition layout `bootstrap`, or operate in the normal `maintain` mode.
114
114
- Use the configuration information as inputs to the required algorithm.
115
115
116
-
## "Add" Algorithm
116
+
## "Maintain" Algorithm
117
117
118
118
The core algorithm is implemented in a method `plan_partition_changes` in `table_append_partition.py`. That algorithm is:
119
119
@@ -152,13 +152,13 @@ Procedure:
152
152
- Append the new partition to the intended empty partition list.
153
153
- Return the lists of non-empty partitions, the current empty partitions, and the post-algorithm intended empty partitions.
154
154
155
-
### "Add" Finalization
155
+
### "Maintain" Finalization
156
156
157
157
The results of the algorithm are converted into `ALTER` statements; if the user configured `--noop` they're emitted to console and the logs for each table. If not set to `--noop`, the application will execute the ALTERs at the database server and emit the results, including execution time as prometheus statistics if so configured.
158
158
159
159
## "Bootstrap" Algorithm
160
160
161
-
The bootstrap mode is a limited form of the "Add" Algorithm, using a temporary state file to determine rates-of-change. The bootstrap mode also does not limit itself to only affecting empty partitions, it can and will request changes that will prmopt row copies, in order to prepare a table for future use of the "Add" algorithm.
161
+
The bootstrap mode is a limited form of the "Maintain" Algorithm, using a temporary state file to determine rates-of-change. The bootstrap mode also does not limit itself to only affecting empty partitions, it can and will request changes that will prmopt row copies, in order to prepare a table for future use of the "Maintain" algorithm.
0 commit comments