You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched in the issues and found nothing similar.
This is a master issue. The individual gaps are tracked as the sub-issues listed below; this one exists to hold the comparison that produced them and to say what they have in common.
#26412 is the counterpart for the Python runtime, from the same audit.
Motivation
The Go function runtime honours a much smaller part of FunctionDetails than the Java and Python runtimes do. Most of the difference is silent: the configuration is accepted by pulsar-admin, stored by the worker, reported back faithfully by functions get, carried into the instance in the protobuf, and then never read.
I audited the three runtimes field by field against Function.proto, reading the consuming code rather than grepping for field names — the generated Function_pb2.py and pulsar-function-go/pb contain every field name, so a naive search reports full support for all three.
Producer maxPendingMessages and maxPendingMessagesAcrossPartitions are absent from both runtimes on master but are already addressed by the open batching PRs (#26392, #26393), so they are not tracked here. useThreadLocalProducers has no equivalent in either client.
The pattern worth naming.EFFECTIVELY_ONCE is the one the Go runtime gets right:
// pulsar-function-go/pf/instanceConf.go:137ifinstanceConf.funcDetails.ProcessingGuarantees==pb.ProcessingGuarantees_EFFECTIVELY_ONCE {
panic("Go instance current not support EFFECTIVELY_ONCE processing guarantees.")
}
Unsupported, and it says so. Every other row in that table fails the other way: accepted and ignored. An operator has no signal short of observing the behaviour in production and inferring backwards. Where a gap is not going to be closed soon, refusing it explicitly is strictly better than dropping it silently, and that would be a reasonable interim resolution for several of these.
Already open and not duplicated here: #26390 / #26391 (batching, with PRs #26392 / #26393), #26397 (Python dead letter, with PR #26400), #26403 (Go custom metric collectors).
Each sub-issue is independently fixable and none blocks another. Ordering by user impact, retainKeyOrdering first: it is the only one in the list whose absence silently breaks a guarantee the user explicitly asked for.
Alternatives
Fixing these as one change was considered and rejected: they touch different parts of instance.go, some need a design decision (whether an unimplementable field should refuse rather than ignore), and a single large PR would be hard to review and hard to revert selectively.
Anything else?
The audit was done against origin/master. Java is treated as the reference implementation throughout — I spot-checked the Java side for the rows that mattered (PulsarSource for retryDetails, BatchingUtils for batchingSpec, JavaInstanceRunnable for the guards) rather than auditing it exhaustively.
Search before reporting
This is a master issue. The individual gaps are tracked as the sub-issues listed below; this one exists to hold the comparison that produced them and to say what they have in common.
#26412 is the counterpart for the Python runtime, from the same audit.
Motivation
The Go function runtime honours a much smaller part of
FunctionDetailsthan the Java and Python runtimes do. Most of the difference is silent: the configuration is accepted bypulsar-admin, stored by the worker, reported back faithfully byfunctions get, carried into the instance in the protobuf, and then never read.I audited the three runtimes field by field against
Function.proto, reading the consuming code rather than grepping for field names — the generatedFunction_pb2.pyandpulsar-function-go/pbcontain every field name, so a naive search reports full support for all three.receiverQueueSizesubscriptionType/subscriptionName/subscriptionPositiontimeoutMscompressionType/batchBuilderuserConfig/secretsMap/logTopic/autoAckretainOrderingretainKeyOrderingretryDetails(deadLetterTopic,maxMessageRetries)forwardSourceMessagePropertybatchingSpeccryptoSpec(consumer)schemaProperties(consumer)poolMessages/consumerProperties/messagePayloadProcessorSpecnegativeAckRedeliveryDelayMsEFFECTIVELY_ONCEProducer
maxPendingMessagesandmaxPendingMessagesAcrossPartitionsare absent from both runtimes on master but are already addressed by the open batching PRs (#26392, #26393), so they are not tracked here.useThreadLocalProducershas no equivalent in either client.The pattern worth naming.
EFFECTIVELY_ONCEis the one the Go runtime gets right:Unsupported, and it says so. Every other row in that table fails the other way: accepted and ignored. An operator has no signal short of observing the behaviour in production and inferring backwards. Where a gap is not going to be closed soon, refusing it explicitly is strictly better than dropping it silently, and that would be a reasonable interim resolution for several of these.
Solution
Close the gaps, tracked individually:
retainOrdering/retainKeyOrderingignored when selecting the subscription type — [Go Functions] retainOrdering and retainKeyOrdering are ignored, so key ordering is silently not preserved #26405retryDetailspopulated but never applied, so no dead letter policy is created — [Go Functions] deadLetterTopic and maxMessageRetries are carried into the instance but never applied #26406ConsumerSpecunapplied:cryptoSpec,schemaProperties,consumerProperties,poolMessages,messagePayloadProcessorSpec— [Go Functions] Most of ConsumerSpec is ignored: cryptoSpec, schemaProperties, consumerProperties, poolMessages #26407forwardSourceMessagePropertynot implemented — [Go Functions] forwardSourceMessageProperty is not implemented, so source message properties are dropped #26408negativeAckRedeliveryDelayMsnot applied to the consumer — [Go Functions] negativeAckRedeliveryDelayMs is ignored, so the client default always applies #26409Related, filed separately because they are a different runtime and a different fix:
poolMessages/consumerProperties/messagePayloadProcessorSpecunapplied — [Python Functions] consumerProperties, poolMessages and messagePayloadProcessorSpec are ignored #26410negativeAckRedeliveryDelayMsunapplied — [Python Functions] negativeAckRedeliveryDelayMs is ignored, so the client default always applies #26411Already open and not duplicated here: #26390 / #26391 (batching, with PRs #26392 / #26393), #26397 (Python dead letter, with PR #26400), #26403 (Go custom metric collectors).
Each sub-issue is independently fixable and none blocks another. Ordering by user impact,
retainKeyOrderingfirst: it is the only one in the list whose absence silently breaks a guarantee the user explicitly asked for.Alternatives
Fixing these as one change was considered and rejected: they touch different parts of
instance.go, some need a design decision (whether an unimplementable field should refuse rather than ignore), and a single large PR would be hard to review and hard to revert selectively.Anything else?
The audit was done against
origin/master. Java is treated as the reference implementation throughout — I spot-checked the Java side for the rows that mattered (PulsarSourceforretryDetails,BatchingUtilsforbatchingSpec,JavaInstanceRunnablefor the guards) rather than auditing it exhaustively.Are you willing to submit a PR?