mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fix #1761
This commit is contained in:
@@ -210,16 +210,16 @@ public class ESTemplate {
|
||||
}
|
||||
}
|
||||
}
|
||||
resetBulkRequestBuilder();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果大于批量数则提交批次, 调用后es bulk请求后,numberOfActions不会清理,需要主动调用函数清0,否则不能起到批量请求的效果
|
||||
* 如果大于批量数则提交批次
|
||||
*/
|
||||
private void commitBulk() {
|
||||
if (getBulk().numberOfActions() >= MAX_BATCH_SIZE) {
|
||||
commit();
|
||||
resetBulkRequestBuilder();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user