ARTIFACTORY: Resolving the "SMALLINT" Error

ARTIFACTORY: Resolving the "SMALLINT" Error

AuthorFullName__c
Piyush Kulkarni
articleNumber
000006158
ft:sourceType
Salesforce
FirstPublishedDate
2024-07-24T08:34:05Z
lastModifiedDate
2024-07-24
VersionNumber
3

While the bundled DerbyDB is efficient, fast, and reliable for managing up to approximately 700,000 (700K) artifacts, JFrog recommends transitioning to an external database once your artifact count surpasses this threshold. Using Derby for larger Artifactory instances may result in complications, particularly with large Federated Repositories. 

Here is an example of a potential error that could occur:

2024-06-12T20:07:04.652Z [jfrt ] [ERROR] [b100757735aed5f3] [p.f.t.PersistedTaskProducer:75] [ated-binary-producer] - Failed to read task, will sleep for a while to recover java.sql.SQLDataException: The resulting value is outside the range for the data type SMALLINT.

This error causes federation processes to become OUT_OF_SYNC and fail, as seen in the screenshot below.

User-added image

The issue stems from the bundled Derby using the SMALLINT data type (maximum 32,700) for storing replication tasks. In contrast, while working with external databases like PostgreSQL, Artifactory uses the INT data type, which supports much larger values and is more suitable for large repositories.

To rectify this issue, you will have to transition to an external database such as PostgreSQL and perform a “Force Full Sync.” For a detailed guide on migrating from Derby to an external database without data loss, please visit the following KB article:
https://jfrog.com/help/r/how-to-move-from-the-derby-database-to-any-external-database-in-unified-platform-artifactory7-x-without-losing-data/versions-applicable-7.x