Skip to content

Commit 9834cd7

Browse files
Merge pull request #8171 from romayalon/romy-5.16-backport
5.16 Backport
2 parents 82377aa + 4741983 commit 9834cd7

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,12 @@ config.TIERING_TTL_MS = 30 * 60 * 1000; // 30 minutes
908908
config.AWS_SDK_VERSION_3_ENABLED = true;
909909
config.DEFAULT_REGION = 'us-east-1';
910910

911+
/////////////////////////
912+
/// VACCUM ANALYZER ///
913+
/////////////////////////
914+
915+
config.VACCUM_ANALYZER_INTERVAL = 86400000;
916+
911917
/////////////////////
912918
// //
913919
// OVERRIDES //

src/cmd/nsfs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
require('../util/dotenv').load();
66
require('aws-sdk/lib/maintenance_mode_message').suppress = true;
7-
const { cluster } = require('../util/fork_utils');
87

98
const dbg = require('../util/debug_module')(__filename);
109
if (!dbg.get_process_name()) dbg.set_process_name('nsfs');
1110
dbg.original_console();
1211

12+
// DO NOT PUT NEW REQUIREMENTS BEFORE SETTING process.env.NC_NSFS_NO_DB_ENV = 'true'
1313
// NC nsfs deployments specifying process.env.LOCAL_MD_SERVER=true deployed together with a db
1414
// when a system_store object is initialized VaccumAnalyzer is being called once a day.
1515
// when NC nsfs deployed without db we would like to avoid running VaccumAnalyzer in any flow there is
@@ -33,6 +33,7 @@ const nb_native = require('../util/nb_native');
3333
//const schema_utils = require('../util/schema_utils');
3434
const RpcError = require('../rpc/rpc_error');
3535
const ObjectSDK = require('../sdk/object_sdk');
36+
const { cluster } = require('../util/fork_utils');
3637
const NamespaceFS = require('../sdk/namespace_fs');
3738
const BucketSpaceSimpleFS = require('../sdk/bucketspace_simple_fs');
3839
const BucketSpaceFS = require('../sdk/bucketspace_fs');

src/test/unit_tests/nc_coretest.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ async function config_dir_setup() {
142142
await fs.promises.writeFile(CONFIG_FILE_PATH, JSON.stringify({
143143
ALLOW_HTTP: true,
144144
OBJECT_SDK_BUCKET_CACHE_EXPIRY_MS: 1,
145-
NC_RELOAD_CONFIG_INTERVAL: 1
145+
NC_RELOAD_CONFIG_INTERVAL: 1,
146+
// DO NOT CHANGE - setting VACCUM_ANALYZER_INTERVAL=1 needed for failing the tests
147+
// in case where vaccumAnalyzer is being called before setting process.env.NC_NSFS_NO_DB_ENV = 'true' on nsfs.js
148+
VACCUM_ANALYZER_INTERVAL: 1
146149
}));
147150
await fs.promises.mkdir(FIRST_BUCKET_PATH, { recursive: true });
148151

src/util/postgres_client.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ class PostgresTable {
610610
if (!process.env.CORETEST && !process.env.NC_NSFS_NO_DB_ENV) {
611611
// Run once a day
612612
// TODO: Configure from PostgreSQL
613-
setInterval(this.vacuumAndAnalyze, 86400000, this).unref();
613+
setInterval(this.vacuumAndAnalyze, config.VACCUM_ANALYZER_INTERVAL, this).unref();
614614
}
615615
}
616616

@@ -705,7 +705,6 @@ class PostgresTable {
705705
dbg.log0('vacuumAndAnalyze finished', context.name);
706706
} catch (err) {
707707
dbg.error('vacuumAndAnalyze failed', err);
708-
throw err;
709708
}
710709
}
711710

0 commit comments

Comments
 (0)