File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -908,6 +908,12 @@ config.TIERING_TTL_MS = 30 * 60 * 1000; // 30 minutes
908908config . AWS_SDK_VERSION_3_ENABLED = true ;
909909config . DEFAULT_REGION = 'us-east-1' ;
910910
911+ /////////////////////////
912+ /// VACCUM ANALYZER ///
913+ /////////////////////////
914+
915+ config . VACCUM_ANALYZER_INTERVAL = 86400000 ;
916+
911917/////////////////////
912918// //
913919// OVERRIDES //
Original file line number Diff line number Diff line change 44
55require ( '../util/dotenv' ) . load ( ) ;
66require ( 'aws-sdk/lib/maintenance_mode_message' ) . suppress = true ;
7- const { cluster } = require ( '../util/fork_utils' ) ;
87
98const dbg = require ( '../util/debug_module' ) ( __filename ) ;
109if ( ! dbg . get_process_name ( ) ) dbg . set_process_name ( 'nsfs' ) ;
1110dbg . 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');
3434const RpcError = require ( '../rpc/rpc_error' ) ;
3535const ObjectSDK = require ( '../sdk/object_sdk' ) ;
36+ const { cluster } = require ( '../util/fork_utils' ) ;
3637const NamespaceFS = require ( '../sdk/namespace_fs' ) ;
3738const BucketSpaceSimpleFS = require ( '../sdk/bucketspace_simple_fs' ) ;
3839const BucketSpaceFS = require ( '../sdk/bucketspace_fs' ) ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments