-
New commands to help storage bags / buckets management:
-
leader:set-replication- allows adjusting bag-to-bucket assignments in order to achieve a target replication rate. -
leader:copy-bags- allows copying all bags from one bucket / set of buckets to a different bucket / set of buckets. -
leader:empty-bucket- allows removing all bags from a given bucket.All of those commands support generating detailed summaries of planned / executed changes in the storage system thanks to the new
BagsUpdateCreatorandBagsUpdateSummaryCreatorservices.
-
-
Adds a possibility to set
CLEANUPandCLEANUP_INTERVALvia env in theservercommand.
- Fixes Colossus docker build by removing a deprecated
@types/winstonpackage. - Adds a few new utility functions (
stringifyBagId,cmpBagId,isEvent,asStorageSize,getBatchResults). - Updates
updateStorageBucketsForBagsto rely on the newgetBatchResultsutility function.
- Optimizations: The way data objects / data object ids are queried and processed during sync and cleanup has been optimized:
- Sync and cleanup services now process tasks in batches of configurable size (
--syncBatchSize,--cleanupBatchSize) to avoid overflowing the memory. - Synchronous operations like
sortorfilteron larger arrays of data objects have been optimized (for example, by replacing.filter(Array.includes(...))with.filter(Set.has(...))). - Enforced a limit of max. results per single GraphQL query to
10,000and max input arguments per query to1,000. - Added
--cleanupWorkersNumberflag to limit the number of concurrent async requests during cleanup.
- Sync and cleanup services now process tasks in batches of configurable size (
- A safety mechanism was added to avoid removing "deleted" objects for which a related
DataObjectDeletedevent cannot be found in storage squid. - Improved logging during sync and cleanup.
- Adds
archivemode / command, which allows downloading, compressing and uploading all data objects to an external S3 bucket that can be used as a backup.
- Fix
util:cleanupscript (callloadDataObjectIdCachefirst) - Allow changing default log level using environment variable (
COLOSSUS_DEFAULT_LOG_LEVEL) - Allow adjusting cleanup constants via env (
CLEANUP_MIN_REPLICATION_THRESHOLD,CLEANUP_NEW_OBJECT_EXPIRATION_PERIOD) - Error handling: Clearer warning messages if unexpected response encountered during sync (ie. 404)
- Bump @joystream/types to Petra version
- Bump deps @polkadot/api v10.7.1
- Nara release.
- Set the
server.requestTimeoutoption inhttp.Serverinstance to 0 to disable the timeout. This was default behaviour pre Node.js18.x
- Replaced
Query-NodeAPI withStorage-SquidGraphql API. This is a breaking change and requires the--queryNodeEndpointconfiguration option to be replaced with--storageSquidEndpoint.
-
Fix processing large arrays causing high cpu during sync and cleanup runs #5033
-
Fix task runner to avoid ending prematurely on individual task failure #5033
- Bug fix: call stack size exceeded error - #5021
- Bug fix: moveFile instead of rename to support moving files across volumes #5024
- FIX unhandled
errorevents on superagent. #4988,#5007 - General improvements when setting up uploads and temp folder. Ensure local data objects cache is not polluted by other than object id file names.
- Added constraint on temp, pending, logs, and uploads folder needing to be at different paths, and added two new optional
--tempFolderand--pendingFolderarguments to specify full path to these folders. This is in preparation for future releases where we will be moving to use different storage backends. #5000 - Improve operator url selection and avoid connecting to self. #4993
- Various bug fixes that were introduced in v3.9.0 in accept pending objects service. #5016
- Syncing worker improvement, no longer relying on
/api/v1/state/data-objectsendpoint to determine which hosts to sync from. #5014
- FIX: Added event handler to handle
errorevent onsuperagent.getinstance. Previously the unhandled error was causing the application to crash.
- Increase default interval between sync runs. Start sync run immediately do not wait initial interval on startup before starting sync. Adds additional optional argument to specify retry interval on failure. #4924
- Add background pruning worker to delete data objects which the node is no longer obligated to store. New optional argument
--cleanupand--cleanupInterval - Added new
AcceptPendingObjectsServicethat is responsible for periodically sending batchaccept_pending_data_objectsfor all the pending data objects. ThePOST /filesendpoint now no longer calls theaccept_pending_data_objectsextrinsic for individual uploads, instead, it registers all the pending objects withAcceptPendingObjectsService - Updated
/state/dataendpoint response headers to return data objects status too i.e. (pendingoraccepted) - FIX: Increase the default timeout value in the
extrinsicWrapperfunction to match the transaction validity in the transaction pool
- Hotfix: Fix call stack size exceeded when handling large number of initial object to sync.
- Changed Elasticsearch transport to use data streams instead of regular indices. Removed
--elasticSearchIndexoption and replaced with--elasticSearchIndexPrefix. Node ID from config will be automatically appended to the index name.
- Bumped
winston-elasticsearchpackage verion - FIX: Added error handler to caught exception in
ElasticsearchTransportand gracefully log them
- Disable open-api express response validation if NODE_ENV == 'production'. This should improve response times when serving assets. #4810
- Include
nodeEnvin/api/v1/statusresponse, to help detect mis-configured nodes.
- Updates
leader:update-bagCLI command toleader:update-bagsto accept multiple bag ids as input. This allows the command to be used to update storage buckets of multiple bags in a single batched transaction.
- Collosus can now store multiple keys in it's keyring.
- The
--accountUriand--passwordargs can be used multiple times to add multiple keys. This adds support for worker to use different transactor accounts for each bucket. - Added
--keyStoreargument for all commands to configure a directory containing multiple key files to the keyring. - Server can run and to serve specific buckets, by passing a comma separated list of bucket ids with the
--bucketsargument. - Renamed
--operatorIdargument to--workerIdin operator commands for consistency.
- FIX
sendExtrinsic: The send extrinsic function (which is a wrapper around PolkadotJStx.signAndSendfunction) has been fixed to handle the case when tx has been finalized before the callback registered intx.signAndSendwould run.
- Integrates OpenTelemetry API/SDK with Colossus for exporting improved tracing logs & metrics to Elasticsearch. Adds
./start-elasticsearch-stack.shscript to bootstrap elasticsearch services (Elasticsearch + Kibana + APM Server) with all the required configurations.
- Added option 'none' to 'logFileChangeFrequency' argument. The default is still 'daily'. 'none' prevents log rotaion on time basis and only rotates when max size for logs files is reached.
- Added customization options for Elasticsearch logging. Users can now specify index name and auth options.
- FIX #4773 Cleanup temporary files created when upload fails.
- Updated
joystream/typesand@joystream/metadata-protobufdependencies. - Dropped
sudobased dev commands
@joystream/typesdependency version bump for consistency with mainnet release versioning
- Adds connected query-node's state information to the
/statusendpoint. - Refactors
QueryNodeApiinitialization (single instance instead of multiple ones) to have persistent apollo client caching, since previously a new client was being initialized for each request leading to entirely new cache object every time.
- FIX
getAllAssignedDataObjects: The query to get all assigned objects during sync has been refactored into smaller queries. Each query will now provide no more than 1000 storage bag ids in the input to avoid hitting the request size limit (see: #4615). - Improved error logging for Apollo GraphQL request errors.
- Carthage/Mainnet release: Breaking change for files upload endpoint, the parameters except the file itself i.e.,
dataObjectId,storageBucketIdandbagIdare removed from the request body and are now part of the query string. This allows the pre-validation of the request params to validate the request before the complete file is uploaded successfully, - API request/response types are now autogenerated from the openapi schema,
- Autogenerated API client library (
@joystream/storage-node-client) is now part of the storage node codebase.