Skip to content

Commit

Permalink
increase sqldump delay
Browse files Browse the repository at this point in the history
  • Loading branch information
alihm committed Jan 8, 2025
1 parent 65fe168 commit 363add4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ClusterOperator/Operator.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,9 @@ class Operator {
static async syncLocalDB() {
if (this.masterWSConn && this.masterWSConn.connected) {
this.status = 'SYNC';
/*
try {
const response = await fluxAPI.getKeys(this.masterWSConn);
console.log(response);
const keys = JSON.parse(Security.decryptComm(Buffer.from(response.keys, 'hex')));
// eslint-disable-next-line guard-for-in
for (const key in keys) {
Expand All @@ -564,6 +564,7 @@ class Operator {
} catch (err) {
log.error(err);
}
*/
let masterSN = BackLog.sequenceNumber + 1;
log.info(`current seq no: ${masterSN}`);
let copyBuffer = false;
Expand Down
4 changes: 2 additions & 2 deletions lib/mysqldump.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) {
// Introduce 25ms delay here
return new Promise(resolve => setTimeout(resolve, 25)).then(() => {
// Introduce 50ms delay here
return new Promise(resolve => setTimeout(resolve, 50)).then(() => {
if (result.done) {
resolve(result.value);
} else {
Expand Down

0 comments on commit 363add4

Please sign in to comment.