Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Zeebe Snapshot issues #680

Merged
2 commits merged into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ private static StreamProcessor createStreamProcessor(
new SubscriptionCommandSender(context.getPartitionId(), commandSender),
new DeploymentDistributionCommandSender(
context.getPartitionId(), commandSender),
jobType -> {},
FeatureFlags.createDefault()))))
.actorSchedulingService(scheduler)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import io.camunda.zeebe.gateway.protocol.GatewayOuterClass;
import io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ActivateJobsRequest;
import io.camunda.zeebe.gateway.protocol.GatewayOuterClass.ActivateJobsResponse;
import io.camunda.zeebe.gateway.protocol.GatewayOuterClass.BroadcastSignalRequest;
import io.camunda.zeebe.gateway.protocol.GatewayOuterClass.BroadcastSignalResponse;
import io.camunda.zeebe.gateway.protocol.GatewayOuterClass.BrokerInfo;
import io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceRequest;
import io.camunda.zeebe.gateway.protocol.GatewayOuterClass.CancelProcessInstanceResponse;
Expand Down Expand Up @@ -63,6 +65,7 @@
import io.camunda.zeebe.protocol.impl.record.value.processinstance.ProcessInstanceModificationVariableInstruction;
import io.camunda.zeebe.protocol.impl.record.value.processinstance.ProcessInstanceRecord;
import io.camunda.zeebe.protocol.impl.record.value.resource.ResourceDeletionRecord;
import io.camunda.zeebe.protocol.impl.record.value.signal.SignalRecord;
import io.camunda.zeebe.protocol.impl.record.value.variable.VariableDocumentRecord;
import io.camunda.zeebe.protocol.record.RecordType;
import io.camunda.zeebe.protocol.record.ValueType;
Expand All @@ -76,6 +79,7 @@
import io.camunda.zeebe.protocol.record.intent.ProcessInstanceIntent;
import io.camunda.zeebe.protocol.record.intent.ProcessInstanceModificationIntent;
import io.camunda.zeebe.protocol.record.intent.ResourceDeletionIntent;
import io.camunda.zeebe.protocol.record.intent.SignalIntent;
import io.camunda.zeebe.protocol.record.intent.VariableDocumentIntent;
import io.camunda.zeebe.protocol.record.value.VariableDocumentUpdateSemantic;
import io.camunda.zeebe.util.VersionUtil;
Expand Down Expand Up @@ -481,6 +485,24 @@ public void deleteResource(
.intent(ResourceDeletionIntent.DELETE));
}

@Override
public void broadcastSignal(
final BroadcastSignalRequest request,
final StreamObserver<BroadcastSignalResponse> responseObserver) {
final var requestId =
gatewayRequestStore.registerNewRequest(request.getClass(), responseObserver);

writer.writeCommandWithoutKey(
new SignalRecord()
.setSignalName(request.getSignalName())
.setVariables(
BufferUtil.wrapArray(MsgPackConverter.convertToMsgPack(request.getVariables()))),
prepareRecordMetadata()
.requestId(requestId)
.valueType(ValueType.SIGNAL)
.intent(SignalIntent.BROADCAST));
}

private ProcessInstanceModificationRecord createProcessInstanceModificationRecord(
final ModifyProcessInstanceRequest request) {
final var record = new ProcessInstanceModificationRecord();
Expand Down