hangc0276 commented on code in PR #23131:
URL: https://github.com/apache/pulsar/pull/23131#discussion_r1712867950
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/cache/impl/MetadataCacheImpl.java:
##########
@@ -108,6 +108,9 @@ private CompletableFuture<Optional<CacheGetResult<T>>>
readValueFromStore(String
try {
GetResult res = optRes.get();
+ if (res.getValue().length == 0) {
+ return FutureUtils.value(Optional.of(new
CacheGetResult<>(null, res.getStat())));
+ }
Review Comment:
BookieServiceInfo handled the case of `res.getValue.length==0` in deserialize
https://github.com/apache/pulsar/blob/1b43b9de72ccf57b56375870b43d551def59d8a3/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/bookkeeper/BookieServiceInfoSerde.java#L72-L74
That's why the test
TestAutoRecoveryAlongWithBookieServers#testAutoRecoveryAlongWithBookieServers
failed.
Maybe we need to deserialize first and add the `res.getValue.length==0`
check in the exception section?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]