Skip to content

Commit 74bb6ff

Browse files
committed
Merge pull request #8954 from FirebirdSQL/work/gh-8928
Implement #8928 : Add limit for max value of -PARALLEL switch value when restoring a database
1 parent eac2bb6 commit 74bb6ff

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
@@ -922,6 +922,8 @@ int gbak(Firebird::UtilSvc* uSvc)
922922
BURP_error(408, true, argv[itr]);
923923
// msg 408 expected parallel workers, encountered "%s"
924924
}
925+
if (tdgbl->gbl_sw_par_workers > BURP_MAX_PARALLEL_WORKERS)
926+
tdgbl->gbl_sw_par_workers = BURP_MAX_PARALLEL_WORKERS;
925927
break;
926928
case IN_SW_BURP_Y:
927929
{

src/burp/burpswi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ static inline constexpr const char* burp_repl_mode_sw_table[] =
246246
BURP_SW_MODE_NONE, BURP_SW_MODE_RO, BURP_SW_MODE_RW
247247
};
248248

249+
const int BURP_MAX_PARALLEL_WORKERS = 64;
249250

250251
#endif // BURP_BURP_H
251252

0 commit comments

Comments
 (0)