|
|
@@ -357,7 +357,7 @@ public abstract class TransformIndexer extends AsyncTwoPhaseIndexer<TransformInd
|
|
|
// If we are not on the initial batch checkpoint and its the first pass of whatever continuous checkpoint we are on,
|
|
|
// we should verify if there are local changes based on the sync config. If not, do not proceed further and exit.
|
|
|
if (context.getCheckpoint() > 0 && initialRun()) {
|
|
|
- sourceHasChanged(ActionListener.wrap(hasChanged -> {
|
|
|
+ checkpointProvider.sourceHasChanged(getLastCheckpoint(), ActionListener.wrap(hasChanged -> {
|
|
|
context.setLastSearchTime(instantOfTrigger);
|
|
|
hasSourceChanged = hasChanged;
|
|
|
if (hasChanged) {
|
|
|
@@ -959,20 +959,6 @@ public abstract class TransformIndexer extends AsyncTwoPhaseIndexer<TransformInd
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void sourceHasChanged(ActionListener<Boolean> hasChangedListener) {
|
|
|
- checkpointProvider.sourceHasChanged(getLastCheckpoint(), ActionListener.wrap(hasChanged -> {
|
|
|
- logger.trace("[{}] change detected [{}].", getJobId(), hasChanged);
|
|
|
- hasChangedListener.onResponse(hasChanged);
|
|
|
- }, e -> {
|
|
|
- logger.warn(() -> "[" + getJobId() + "] failed to detect changes for transform. Skipping update till next check.", e);
|
|
|
- auditor.warning(
|
|
|
- getJobId(),
|
|
|
- "Failed to detect changes for transform, skipping update till next check. Exception: " + e.getMessage()
|
|
|
- );
|
|
|
- hasChangedListener.onResponse(false);
|
|
|
- }));
|
|
|
- }
|
|
|
-
|
|
|
private IterationResult<TransformIndexerPosition> processBuckets(final SearchResponse searchResponse) {
|
|
|
Tuple<Stream<IndexRequest>, Map<String, Object>> indexRequestStreamAndCursor = function.processSearchResponse(
|
|
|
searchResponse,
|