mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
execution service: Don't try to send empty bulk requests
Closes elastic/elasticsearch#264 Original commit: elastic/x-pack-elasticsearch@f636bfd956
This commit is contained in:
parent
e438c51555
commit
5bc491d359
@ -125,6 +125,10 @@ public class ExecutionService extends AbstractComponent {
|
||||
}
|
||||
|
||||
logger.debug("saving watch records [{}]", records.size());
|
||||
if (records.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (records.size() == 1) {
|
||||
final WatchRecord watchRecord = records.getFirst();
|
||||
final TriggeredExecutionContext ctx = contexts.getFirst();
|
||||
@ -186,6 +190,10 @@ public class ExecutionService extends AbstractComponent {
|
||||
}
|
||||
|
||||
logger.debug("saving watch records [{}]", records.size());
|
||||
if (records.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (records.size() == 1) {
|
||||
final WatchRecord watchRecord = records.getFirst();
|
||||
final TriggeredExecutionContext ctx = contexts.getFirst();
|
||||
|
Loading…
x
Reference in New Issue
Block a user