-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 publish_time not set error when broker entry metadata enable without AppendBrokerTimestampMetadataInterceptor #11014
Conversation
After discussing with @aloyszhang , we need to find why the required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publish_time is required filed in message metadata proto, we should figure out the reason why this filed missed first.
pulsar-client/src/test/java/org/apache/pulsar/client/impl/MessageImplTest.java
Outdated
Show resolved
Hide resolved
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
@lhotari Hi could you help look at this test failure?
I see your PR (#11048) fixed the flaky test, but it still failed for multiple times. |
/pulsarbot run-failure-checks |
@BewareMyPower @hangc0276 PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to rename deserializeBrokerEntryMetadataFirst
to deserializeBrokerTimestampFirst
. When this method was added, there was only one type of BrokerEntryMetadata: BrokerTimestamp. So it was named to deserializeBrokerMetadata
.
However, now we have multiple types of BrokerEntryMetadata. Checking hasBrokerTimestamp()
in a deserializeBrokerTimestampFirst
method is weird.
@BewareMyPower I have added a new method named |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java
Outdated
Show resolved
Hide resolved
/pulsarbot run-failure-checks |
…out AppendBrokerTimestampMetadataInterceptor
@hangc0276 Could you also take a look? |
cc @hangc0276 |
@sijie @codelipenghui PTAL |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/test/java/org/apache/pulsar/client/impl/MessageImplTest.java
Show resolved
Hide resolved
/pulsarbot run-failure-checks |
@hangc0276 Thanks for your comments, I've resolved them. |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java
Outdated
Show resolved
Hide resolved
@hangc0276 PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
### Motivation #11014 introduced `getEntryTimestamp` and removed `deserializeBrokerEntryMetaDataFirst`, but #11139 is still using `deserializeBrokerEntryMetaDataFirst`, and it breaks master branch. ### Modifications use `entryTimestamp` for expiry checking in `internalGetMessageIdByTimestamp` ### Verifying this change - [x] Make sure that the change passes the CI checks.
…out AppendBrokerTimestampMetadataInterceptor (#11014) Fixes #11013 ### Motivation fix publish_time not set error when broker entry metadata enable without AppendBrokerTimestampMetadataInterceptor ### Modifications 1. add a new method named `getEntryTimestamp` which will return the `brokerEntryTimestamp` if `BrokerEntryMetadata` is enabled or otherwise return the `publishTime`. 2. using this `entryTimestamp` for expiry checking. (cherry picked from commit fe7cf67)
To get around KoP issue: apache/pulsar#11014
To get around KoP issue: apache/pulsar#11014
…out AppendBrokerTimestampMetadataInterceptor (apache#11014) Fixes apache#11013 ### Motivation fix publish_time not set error when broker entry metadata enable without AppendBrokerTimestampMetadataInterceptor ### Modifications 1. add a new method named `getEntryTimestamp` which will return the `brokerEntryTimestamp` if `BrokerEntryMetadata` is enabled or otherwise return the `publishTime`. 2. using this `entryTimestamp` for expiry checking. (cherry picked from commit fe7cf67)
…out AppendBrokerTimestampMetadataInterceptor (apache#11014) Fixes apache#11013 ### Motivation fix publish_time not set error when broker entry metadata enable without AppendBrokerTimestampMetadataInterceptor ### Modifications 1. add a new method named `getEntryTimestamp` which will return the `brokerEntryTimestamp` if `BrokerEntryMetadata` is enabled or otherwise return the `publishTime`. 2. using this `entryTimestamp` for expiry checking.
### Motivation apache#11014 introduced `getEntryTimestamp` and removed `deserializeBrokerEntryMetaDataFirst`, but apache#11139 is still using `deserializeBrokerEntryMetaDataFirst`, and it breaks master branch. ### Modifications use `entryTimestamp` for expiry checking in `internalGetMessageIdByTimestamp` ### Verifying this change - [x] Make sure that the change passes the CI checks.
Fixes #11013
Motivation
fix publish_time not set error when broker entry metadata enable without AppendBrokerTimestampMetadataInterceptor
Modifications
getEntryTimestamp
which will return thebrokerEntryTimestamp
ifBrokerEntryMetadata
is enabled or otherwise return thepublishTime
.entryTimestamp
for expiry checking.Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changes