Skip to content

Commit

Permalink
Extended protobuf definition to pass query result limit to workers
Browse files Browse the repository at this point in the history
  • Loading branch information
iagaponenko committed Jul 20, 2023
1 parent 1d3ed34 commit 66b9ab8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/proto/worker.proto
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ message TaskMsg {
optional bool scaninteractive = 12;
optional int32 attemptcount = 13;
optional uint32 czarid = 14;
optional int32 maxtablesize_mb = 15 [default = 0];
}

// Result message received from worker
Expand Down
2 changes: 2 additions & 0 deletions src/qproc/TaskMsgFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "lsst/log/Log.h"

// Qserv headers
#include "czar/CzarConfig.h"
#include "global/intTypes.h"
#include "qmeta/types.h"
#include "qproc/ChunkQuerySpec.h"
Expand Down Expand Up @@ -84,6 +85,7 @@ std::shared_ptr<proto::TaskMsg> TaskMsgFactory::_makeMsg(ChunkQuerySpec const& c

taskMsg->set_scanpriority(chunkQuerySpec.scanInfo.scanRating);
taskMsg->set_scaninteractive(chunkQuerySpec.scanInteractive);
taskMsg->set_maxtablesize_mb(czar::CzarConfig::instance()->getMaxTableSizeMB());

// per-chunk
taskMsg->set_chunkid(chunkQuerySpec.chunkId);
Expand Down

0 comments on commit 66b9ab8

Please sign in to comment.