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

[server][controller] Handle various exceptions #1062

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

majisourav99
Copy link
Contributor

Handle various exception

Resolves exception handling.

How was this PR tested?

GHCI

Does this PR introduce any user-facing changes?

  • No. You can skip the rest of this section.
  • Yes. Make sure to explain your proposed changes and call out the behavior change.

Comment on lines +1872 to +1886
try {
return producerAdapter.sendMessage(
topicPartition.getPubSubTopic().getName(),
topicPartition.getPartitionNumber(),
KafkaKey.HEART_BEAT,
kafkaMessageEnvelope,
getHeaders(kafkaMessageEnvelope.getProducerMetadata(), addLeaderCompleteState, leaderCompleteState),
callback);
} catch (Exception e) {
logger.error("Could not send heartbeat for topic {}", topicPartition.getPubSubTopic().getName());
CompletableFuture<PubSubProduceResult> heartBeatFuture;
heartBeatFuture = new CompletableFuture<>();
heartBeatFuture.completeExceptionally(e);
return heartBeatFuture;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This handling is also present in LFSIT#sendIngestionHeartbeat. Do we need it here as well?

final Store store = metadataRepository.getStoreOrThrow(storeName);
final Store store = metadataRepository.getStore(storeName);
if (store == null) {
LOGGER.error("Store {} not found in store repo.", storeName);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make it a WARN?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants