@@ -7,24 +7,24 @@ import sys
77import fossildbapi_pb2 as proto
88import fossildbapi_pb2_grpc as proto_rpc
99
10+ MAX_MESSAGE_LENGTH = 1073741824
1011
1112def main ():
12- verbose = False
13+ verbose = True
1314
1415 collections = ['skeletons' , 'volumes' , 'volumeData' , 'skeletonUpdates' ]
1516
16- srcPort = 7156
17- dstPort = 7155
18-
1917 listKeysBatchSize = 300
2018
19+ srcPort = 2000
20+ dstPort = 7155
2121
22-
23-
24- srcChannel = grpc .insecure_channel ('localhost:{}' .format (srcPort ))
22+ srcChannel = grpc .insecure_channel ('localhost:{}' .format (srcPort ), options = [('grpc.max_send_message_length' , MAX_MESSAGE_LENGTH ), (
23+ 'grpc.max_receive_message_length' , MAX_MESSAGE_LENGTH )])
2524 srcStub = proto_rpc .FossilDBStub (srcChannel )
2625
27- dstChannel = grpc .insecure_channel ('localhost:{}' .format (dstPort ))
26+ dstChannel = grpc .insecure_channel ('localhost:{}' .format (dstPort ), options = [('grpc.max_send_message_length' , MAX_MESSAGE_LENGTH ), (
27+ 'grpc.max_receive_message_length' , MAX_MESSAGE_LENGTH )])
2828 dstStub = proto_rpc .FossilDBStub (dstChannel )
2929
3030 testHealth (srcStub , 'source fossildb at {}' .format (srcPort ))
@@ -34,7 +34,7 @@ def main():
3434
3535 for collection in collections :
3636 print ('copying collection ' + collection )
37- lastKey = ''
37+ lastKey = None
3838 while True :
3939 listKeysReply = srcStub .ListKeys (proto .ListKeysRequest (collection = collection , limit = listKeysBatchSize , startAfterKey = lastKey ))
4040 assertSuccess (listKeysReply )
0 commit comments