Skip to content

Commit

Permalink
Release testnet hotfix (#1622)
Browse files Browse the repository at this point in the history
* Updated logs for low estimated value datasets pruning

* update polygon mainnet configuration

Co-authored-by: Milos Kotlar <[email protected]>
  • Loading branch information
djordjekovac and kotlarmilos authored Aug 26, 2021
1 parent 39791e2 commit a17ec7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,8 @@
{
"blockchain_title": "Polygon",
"network_id": "polygon:mainnet",
"rpc_server_url": "https://rpc-mainnet.matic.network",
"chain_id": 137,
"hub_contract_address": "",
"hub_contract_address": "0x86dB1592CD083dD7c758196dB55f317fed6A0a22",
"identity_filepath": "polygon_erc725_identity.json",
"gas_limit": "2000000",
"gas_price": "1000000000",
Expand Down
9 changes: 6 additions & 3 deletions modules/command/common/dataset-pruning-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DatasetPruningCommand extends Command {
this.logger.debug('Dataset pruning command ignored.');
return Command.empty();
}

this.logger.trace('Dataset pruning command started. This command will work in background and will try to remove expired and low estimated value datasets.');
const datasets = await this.datasetPruningService.fetchDatasetData();

const repackedDatasets = this.datasetPruningService.repackDatasets(datasets);
Expand All @@ -34,7 +34,9 @@ class DatasetPruningCommand extends Command {
.replicated_pruning_delay_in_minutes,
);
const forked = fork('modules/worker/dataset-pruning-worker.js');

if (idsForPruning.datasetsToBeDeleted.length !== 0) {
this.logger.trace(`Removing ${idsForPruning.datasetsToBeDeleted.length} expired datasets.`);
}
forked.send(JSON.stringify({
selectedDatabase: this.config.database,
idsForPruning,
Expand All @@ -43,7 +45,7 @@ class DatasetPruningCommand extends Command {

forked.on('message', async (response) => {
if (response.error) {
this.logger.error(`Error while pruning datasets. Error message: ${response.error.message}`);
this.logger.error(`Error while pruning datasets. Error message: ${response.error.message}. Pruning command will be executed again in ${constants.DATASET_PRUNING_COMMAND_TIME_MILLS / (1000 * 60 * 60)} hours`);
forked.kill();
await this.addPruningCommandToExecutor();
return;
Expand Down Expand Up @@ -76,6 +78,7 @@ class DatasetPruningCommand extends Command {
.getLowEstimatedValueIdsForPruning(repackedDatasets);

if (idsForPruning.datasetsToBeDeleted.length !== 0) {
this.logger.trace(`Removing ${idsForPruning.datasetsToBeDeleted.length} low estimated value datasets.`);
forked.send(JSON.stringify({
selectedDatabase: this.config.database,
idsForPruning,
Expand Down
1 change: 0 additions & 1 deletion modules/service/dataset-pruning-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ class DatasetPruningService {
`Minimum size of Graph DB is 20% of total disk size. Current Graph DB folder size is: ${arangoDbEngineFolderSize}kb`);
return false;
}
this.logger.debug('Bulk pruning of low estimated datasets will be executed.');
return true;
} catch (error) {
this.logger.error('Error while trying to determine should low estimated datasets be pruned. Error: ', error.message);
Expand Down

0 comments on commit a17ec7c

Please sign in to comment.