mirror of https://github.com/tikv/client-java.git
				
				
				
			Ingest: fix split batch bug & Increase ingest timeout (#272)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
This commit is contained in:
		
							parent
							
								
									ebe1edc65c
								
							
						
					
					
						commit
						591815b889
					
				| 
						 | 
				
			
			@ -78,7 +78,7 @@ public class ImporterClient {
 | 
			
		|||
          pairs.add(ImportSstpb.Pair.newBuilder().setKey(pair.first).setValue(pair.second).build());
 | 
			
		||||
          totalBytes += (pair.first.size() + pair.second.size());
 | 
			
		||||
        }
 | 
			
		||||
        if (totalBytes > maxKVBatchBytes) {
 | 
			
		||||
        if (totalBytes > maxKVBatchBytes || !iterator.hasNext()) {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			@ -89,6 +89,7 @@ public class ImporterClient {
 | 
			
		|||
        streamOpened = true;
 | 
			
		||||
      }
 | 
			
		||||
      writeBatch(pairs);
 | 
			
		||||
      totalBytes = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (streamOpened) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue