Fixed the gRPC Problem for Data Exchange
diff --git a/storage/StorageConstants.hpp b/storage/StorageConstants.hpp
index c4debe0..6046ab6 100644
--- a/storage/StorageConstants.hpp
+++ b/storage/StorageConstants.hpp
@@ -53,6 +53,8 @@
const std::uint64_t kAGigaByte = (1 << 30);
// A MegaByte.
const std::uint64_t kAMegaByte = (1 << 20);
+// 4 MegaByte + 9 Bytes
+const std::uint32_t kGrpcChanelSize = (4 << 20) + 9;
// Constants for the minimum and maximum user-specifiable BLOCKSIZEMB in
// the SQL clause BLOCKPROPERTIES.
diff --git a/storage/StorageManager.cpp b/storage/StorageManager.cpp
index 12a96d1..8f17455 100644
--- a/storage/StorageManager.cpp
+++ b/storage/StorageManager.cpp
@@ -687,8 +687,13 @@
#ifdef QUICKSTEP_DISTRIBUTED
const string domain_network_address = getPeerDomainNetworkAddress(BlockIdUtil::Domain(block));
DLOG(INFO) << "Pulling Block " << BlockIdUtil::ToString(block) << " from " << domain_network_address;
+
+ // Customize the grpc channel
+ grpc::ChannelArguments channelArgs;
+ channelArgs.SetMaxReceiveMessageSize(kGrpcChanelSize);
+
DataExchangerClientAsync client(
- grpc::CreateChannel(domain_network_address, grpc::InsecureChannelCredentials()), this);
+ grpc::CreateCustomChannel(domain_network_address, grpc::InsecureChannelCredentials(), channelArgs), this);
while (!client.Pull(block, numa_node, &loaded_handle)) {
LOG(INFO) << "Retry pulling Block " << BlockIdUtil::ToString(block) << " from " << domain_network_address;
}