Removing a partition

A partition can be removed with the "dropPartition" Upgrade Tool command. This deletes all documents contained within the partition. It is therefore suitable to remove large amounts of documents from an ImageMaster system.

Note: Special care must be taken not to drop partitions that contain vital system documents (such as configuration documents), otherwise the system can be left in a non-functioning state. Especially the partition containing the partition key "0", which is the system default at installation time, may contain such documents and therefore should not be dropped.
Note: Removing a database partition only deletes the metadata of the contained documents. Any binary files related to the documents remain in their respective archives. Therefore, in order to cleanly delete the complete documents, the archives should be configured in such a way that binary files are split into separate archives in the same way as they are distributed among partitions. This way it is possible to delete the corresponding file archive whenever a partition is dropped.

This operation is fast even if performed on a large partition. If the appropriate indices do not exist in the system, precondition checks however may take long to execute.

Example:

dropPartition PARTITION_2015

ImageMaster features excluding the support of partition dropping

Some ImageMaster features depend on the integrity of references between rows in different database partitions. This makes these features incompatible with the dropping of database partitions. It is therefore essential that the possible use of "dropPartition" for mass-deletion of documents is decided already in the planning of an ImageMaster system so the affected features can be avoided. Otherwise it may not be possible to safely drop a partition later.

The following features are affected:

Feature

Restriction and Consequences

Folder Structure

Dropping a partition will fail if it contains a folder entry or a document referenced by a folder entry. This feature should therefore not be used in systems where partitions will be dropped.

Master Data Links

Dropping a partition will fail if it contains documents with non-dynamic master data links (even if the source is in the same partition). It should be ensured that all master data documents are created in partitions that will never be dropped to avoid this problem.

Single Instance Archiving
(data deduplication)

The initial database model must be created without the "SingleInstancePartition" database option, otherwise dropping partitions is not possible at all. This is the case even if Single Instancing is never actually used in the system!

Starting with release 9.8.1, the "SingleInstancePartition" option is off by default when creating new database models.
(Activating this option allows single instancing across multiple partitions, which is in conflict with dropping partitions.)

Table 388: ImageMaster feature restrictions for partitioning support

Precondition checks

The generated database script contains checks to ensure that dropping the partition does not violate any retention restrictions of contained documents and that no conflicting ImageMaster features are in use. If a precondition check fails, the script execution will abort.

These precondition checks require additional database indices for a fast execution that are not part of the standard ImageMaster database model. The command will display an appropriate message if such indices are needed and a script to create them can be generated using the "dropPartition" command with the --create-check-indices option. It is also possible to just ignore missing indices and generate the appropriate script without them. This is recommended only for small databases where the impact of a missing index is low.

See Dropping a partition in [SM Upgrade Tool] for the options related to precondition checks in the "dropPartition" command.

List-partitioning

All documents with a partition key associated with the partition will be deleted.

Range-partitioning

All documents with a partition key in the range of the partition will be deleted. It is only possible to drop the partition at the low or high end of the partition list. It is not possible to drop a partition that exists between other partitions.