diff --git a/doc/README.gbak b/doc/README.gbak index c28d6bca40f..36db6201ffc 100644 --- a/doc/README.gbak +++ b/doc/README.gbak @@ -63,9 +63,12 @@ this case engine will use value of ParallelWorkers setting when building indices, i.e. this phase could be run in parallel by the engine itself. To fully avoid parallel operations when restoring database, use -PARALLEL 1. - Note, gbak not uses firebird.conf by itself and ParallelWorkers setting does + Note: gbak not uses firebird.conf by itself and ParallelWorkers setting does not affect its operations. + Note: the upper limit for the number of parallel workers is 64 and applied by +both backup and restore. + Examples. diff --git a/src/burp/burp.cpp b/src/burp/burp.cpp index d3ff92c707b..09d57f4b3d9 100644 --- a/src/burp/burp.cpp +++ b/src/burp/burp.cpp @@ -899,6 +899,8 @@ int gbak(Firebird::UtilSvc* uSvc) BURP_error(408, true, argv[itr]); // msg 408 expected parallel workers, encountered "%s" } + if (tdgbl->gbl_sw_par_workers > BURP_MAX_PARALLEL_WORKERS) + tdgbl->gbl_sw_par_workers = BURP_MAX_PARALLEL_WORKERS; break; case IN_SW_BURP_Y: { diff --git a/src/burp/burpswi.h b/src/burp/burpswi.h index 609f928614b..b3957f407cd 100644 --- a/src/burp/burpswi.h +++ b/src/burp/burpswi.h @@ -239,6 +239,7 @@ static const char* burp_repl_mode_sw_table[] = BURP_SW_MODE_NONE, BURP_SW_MODE_RO, BURP_SW_MODE_RW }; +const int BURP_MAX_PARALLEL_WORKERS = 64; #endif // BURP_BURP_H