Configure the SHA-256 Migration Process

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo

The migration process can be configured through the following system properties, or using the Start SHA256 Migration Task and Stop SHA256 Migration Task REST API endpoints

By default, the migration will run on any node in the cluster (arbitrarily). However, using theforceRunOnNodeIdproperty described below, you can configure it to run on a specific node.

Property NameFunction

artifactory.sha2.migration.job.enabled

[ Default: false ]

When true, the process that migrates the database to include SHA-256 checksum for all artifacts will be invoked when the node is restarted.

artifactory.sha2.migration.job.forceRunOnNodeId

[ Default: null ]

Valid only for HA installations.

By default, the migration process runs on any node in the cluster (arbitrarily). To run the process on any other node, set this value to the corresponding node's ID (as specified in the node settings section in the node's Artifactory System YAML file).

Running the migration on a dedicated node

This gives you the option of dedicating a specific node to run the migration and allocating extra resources allowing it to finish the process faster.

Set the property on all nodes in the cluster

To run the migration process on a specific node, you will need toset this property on each node in the cluster. Artifactory will still only run the process on the corresponding specific node.

artifactory.migration.job.dbQueryLimit

[ Default: 100 ]

Specifies the number of rows that should be retrieved each time the migration job queries the database for entries that are missing SHA-256 values.

artifactory.migration.job.batchSize

[ Default: 10 ]

Artifacts are updated concurrently in batches with new SHA-256 values and then a sleep cycle is initiated. This property specifies the number of artifacts in each batch.

artifactory.sha2.migration.job.queue.workers

[ Default: 2 ]

Specifies the number of concurrent threads that should execute actual artifact updates.

Each concurrent artifact update may incur a download in order to calculate its SHA-256 checksum. However, the artifact will only be downloaded once, first time a database entry is found for it with no SHA-256 value. Subsequent database entries for the same artifact (which therefore have the same SHA1 value) will reuse the SHA-256 value that was already calculated.

artifactory.migration.job.sleepIntervalMillis

[ Default: 5000 milliseconds ]

Specifies the duration of the sleep cycle which is initiated after each batch of updates.

You can paste the following sample snippet into your artifactory.system.properties. Adjust the number of workers as appropriate based on I/O and CPU utilization.

Example artifactory.system.properties snippet

##SHA2 Migration block
artifactory.sha2.migration.job.enabled=true
artifactory.sha2.migration.job.queue.workers=5

Restart required

For changes to the migration configuration to take effect, you need to restart the instance (or node in the case of an HA installation) that will run it. The default values specified above are set to keep your system performing optimally during the migration process. To speed up the migration process, you may tweak these values (keeping hardware limits in mind). However, it can impact the system performance.