Skip to content

Commit

Permalink
fixup: fix init window and fetch limit calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
alltilla committed Oct 7, 2024
1 parent 41fe827 commit 6b20819
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/grpc/common/grpc-source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ SourceDriver::init()

::grpc::EnableDefaultHealthCheckService(true);

this->super->super.worker_options.super.init_window_size /= super->super.num_workers;

if (fetch_limit == -1)
fetch_limit = this->super->super.worker_options.super.init_window_size;
{
if (super->super.worker_options.super.init_window_size != -1)
fetch_limit = super->super.worker_options.super.init_window_size / super->super.num_workers;
else
fetch_limit = 100;
}

return log_threaded_source_driver_init_method(&this->super->super.super.super.super);
}
Expand Down

0 comments on commit 6b20819

Please sign in to comment.