Skip to content

Commit

Permalink
merge: #10171
Browse files Browse the repository at this point in the history
10171: Small Clean up r=Zelldon a=Zelldon

## Description

* Remove unused BufferedProcessingResultBuilder, see #10001
* Remove some unused fields

<!-- Please explain the changes you made here. -->

## Related issues

<!-- Which issues are closed by this PR or are related -->

related to #10001



Co-authored-by: Christopher Zell <zelldon91@googlemail.com>
  • Loading branch information
zeebe-bors-camunda[bot] and Zelldon committed Aug 25, 2022
2 parents 4d31100 + b41addb commit 8b062e9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 307 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
import io.camunda.zeebe.engine.api.TypedRecord;
import io.camunda.zeebe.engine.metrics.StreamProcessorMetrics;
import io.camunda.zeebe.engine.processing.streamprocessor.RecordValues;
import io.camunda.zeebe.engine.state.mutable.MutableZeebeState;
import io.camunda.zeebe.logstreams.impl.Loggers;
import io.camunda.zeebe.logstreams.log.LogStream;
import io.camunda.zeebe.logstreams.log.LogStreamReader;
import io.camunda.zeebe.logstreams.log.LoggedEvent;
import io.camunda.zeebe.protocol.impl.record.RecordMetadata;
Expand Down Expand Up @@ -88,14 +86,8 @@ public final class ProcessingStateMachine {
"Expected to execute side effects for record '{} {}' successfully, but exception was thrown.";
private static final String ERROR_MESSAGE_UPDATE_STATE_FAILED =
"Expected to successfully update state for record '{} {}', but caught an exception. Retry.";
private static final String ERROR_MESSAGE_ON_EVENT_FAILED_SKIP_EVENT =
"Expected to find processor for record '{} {}', but caught an exception. Skip this record.";
private static final String ERROR_MESSAGE_PROCESSING_FAILED_SKIP_EVENT =
"Expected to successfully process record '{} {}' with processor, but caught an exception. Skip this record.";
private static final String ERROR_MESSAGE_PROCESSING_FAILED_RETRY_PROCESSING =
"Expected to process record '{} {}' successfully on stream processor, but caught recoverable exception. Retry processing.";
private static final String PROCESSING_ERROR_MESSAGE =
"Expected to process record '%s' without errors, but exception occurred with message '%s'.";
private static final String NOTIFY_PROCESSED_LISTENER_ERROR_MESSAGE =
"Expected to invoke processed listener for record {} successfully, but exception was thrown.";
private static final String NOTIFY_SKIPPED_LISTENER_ERROR_MESSAGE =
Expand All @@ -113,11 +105,9 @@ public final class ProcessingStateMachine {
new MetadataEventFilter(
recordMetadata -> recordMetadata.getRecordType() != RecordType.COMMAND);

private final MutableZeebeState zeebeState;
private final MutableLastProcessedPositionState lastProcessedPositionState;
private final RecordMetadata metadata = new RecordMetadata();
private final ActorControl actor;
private final LogStream logStream;
private final LogStreamReader logStreamReader;
private final LegacyTypedStreamWriter logStreamWriter;
private final TransactionContext transactionContext;
Expand Down Expand Up @@ -157,8 +147,6 @@ public ProcessingStateMachine(
recordValues = context.getRecordValues();
logStreamReader = context.getLogStreamReader();
logStreamWriter = context.getLogStreamWriter();
logStream = context.getLogStream();
zeebeState = context.getZeebeState();
transactionContext = context.getTransactionContext();
abortCondition = context.getAbortCondition();
lastProcessedPositionState = context.getLastProcessedPositionState();
Expand All @@ -168,7 +156,7 @@ public ProcessingStateMachine(
updateStateRetryStrategy = new RecoverableRetryStrategy(actor);
this.shouldProcessNext = shouldProcessNext;

final int partitionId = logStream.getPartitionId();
final int partitionId = context.getLogStream().getPartitionId();
typedCommand = new TypedRecordImpl(partitionId);

metrics = new StreamProcessorMetrics(partitionId);
Expand Down

0 comments on commit 8b062e9

Please sign in to comment.