Skip to content

Commit 72f63a4

Browse files
authored
Merge pull request #8954 from FirebirdSQL/work/gh-8928
Implement #8928 : Add limit for max value of -PARALLEL switch value when restoring a database
2 parents 7631a1b + 012eea2 commit 72f63a4

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

doc/README.gbak

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,12 @@ this case engine will use value of ParallelWorkers setting when building
6363
indices, i.e. this phase could be run in parallel by the engine itself. To
6464
fully avoid parallel operations when restoring database, use -PARALLEL 1.
6565

66-
Note, gbak not uses firebird.conf by itself and ParallelWorkers setting does
66+
Note: gbak not uses firebird.conf by itself and ParallelWorkers setting does
6767
not affect its operations.
6868

69+
Note: the upper limit for the number of parallel workers is 64 and applied by
70+
both backup and restore.
71+
6972

7073
Examples.
7174

src/burp/burp.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,8 @@ int gbak(Firebird::UtilSvc* uSvc)
899899
BURP_error(408, true, argv[itr]);
900900
// msg 408 expected parallel workers, encountered "%s"
901901
}
902+
if (tdgbl->gbl_sw_par_workers > BURP_MAX_PARALLEL_WORKERS)
903+
tdgbl->gbl_sw_par_workers = BURP_MAX_PARALLEL_WORKERS;
902904
break;
903905
case IN_SW_BURP_Y:
904906
{

src/burp/burpswi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ static const char* burp_repl_mode_sw_table[] =
239239
BURP_SW_MODE_NONE, BURP_SW_MODE_RO, BURP_SW_MODE_RW
240240
};
241241

242+
const int BURP_MAX_PARALLEL_WORKERS = 64;
242243

243244
#endif // BURP_BURP_H
244245

0 commit comments

Comments
 (0)