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] [meta] Oxia metadta store: Convert error to MetadataStoreException if operation failed #23154

Merged

Conversation

poorbarcode
Copy link
Contributor

Motivation & Modifications

Once the Oxia's operation fails to execute, you will get many kinds of errors, such as io.grpc.StatusRuntimeException, which is not expected, we should convert these exceptions to MetadataStoreException

Aug 12, 2024 4:52:07 PM com.github.benmanes.caffeine.cache.LocalAsyncCache lambda$handleCompletion$7
WARNING: Exception thrown during asynchronous load
java.util.concurrent.CompletionException: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:874)
	at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162)
	at io.streamnative.oxia.client.batch.Operation.fail(Operation.java:56)
	at io.streamnative.oxia.client.batch.ReadBatch.lambda$onError$0(ReadBatch.java:80)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at io.streamnative.oxia.client.batch.ReadBatch.onError(ReadBatch.java:80)
	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:491)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:567)
	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:71)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:735)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:716)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at io.grpc.internal.SerializeReentrantCallsDirectExecutor.execute(SerializeReentrantCallsDirectExecutor.java:49)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.closedInternal(ClientCallImpl.java:743)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.closed(ClientCallImpl.java:683)
	at io.grpc.internal.FailingClientStream.start(FailingClientStream.java:61)
	at io.grpc.internal.ClientCallImpl.startInternal(ClientCallImpl.java:291)
	at io.grpc.internal.ClientCallImpl.start(ClientCallImpl.java:193)
	at io.grpc.stub.ClientCalls.startCall(ClientCalls.java:345)
	at io.grpc.stub.ClientCalls.asyncUnaryRequestCall(ClientCalls.java:319)
	at io.grpc.stub.ClientCalls.asyncUnaryRequestCall(ClientCalls.java:307)
	at io.grpc.stub.ClientCalls.asyncServerStreamingCall(ClientCalls.java:91)
	at io.streamnative.oxia.proto.OxiaClientGrpc$OxiaClientStub.read(OxiaClientGrpc.java:558)
	at io.streamnative.oxia.client.batch.ReadBatch.send(ReadBatch.java:62)
	at io.streamnative.oxia.client.batch.Batcher.batcherLoop(Batcher.java:125)
	at io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
	at io.grpc.Status.asRuntimeException(Status.java:539)
	... 21 more

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode added this to the 3.4.0 milestone Aug 12, 2024
@poorbarcode poorbarcode self-assigned this Aug 12, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 12, 2024
@poorbarcode poorbarcode added ready-to-test and removed doc-not-needed Your PR changes do not impact docs labels Aug 12, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 12, 2024
@poorbarcode
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.54%. Comparing base (bbc6224) to head (b1941cb).
Report is 780 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23154      +/-   ##
============================================
+ Coverage     73.57%   74.54%   +0.97%     
- Complexity    32624    33582     +958     
============================================
  Files          1877     1919      +42     
  Lines        139502   144269    +4767     
  Branches      15299    15778     +479     
============================================
+ Hits         102638   107545    +4907     
+ Misses        28908    28477     -431     
- Partials       7956     8247     +291     
Flag Coverage Δ
inttests 27.73% <14.28%> (+3.14%) ⬆️
systests 24.78% <0.00%> (+0.45%) ⬆️
unittests 73.88% <100.00%> (+1.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...e/pulsar/metadata/impl/oxia/OxiaMetadataStore.java 87.75% <100.00%> (-2.25%) ⬇️

... and 499 files with indirect coverage changes

@poorbarcode poorbarcode merged commit 38134bc into apache:master Aug 12, 2024
59 of 62 checks passed
Technoboy- pushed a commit that referenced this pull request Aug 14, 2024
grssam pushed a commit to grssam/pulsar that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants