You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/21 13:24:16 UTC
[GitHub] [pulsar] codelipenghui opened a new pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
codelipenghui opened a new pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003
### Motivation
To trigger the system topic compaction to avoid lost any data since we are using a reader for reading
data from the __change_events topic, if no durable subscription on the topic, the data might be lost.
Since we are using the topic compaction on the __change_events topic to reduce the topic policy
cache recovery time, so we can leverage the topic compaction cursor for retaining the data.
We can trigger the compaction directly here since for the first time we create the system topic,
The system topic does not have any data, the operation just pre-creates the subscription for the
topic compaction.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865452526
```
Error: Tests run: 19, Failures: 5, Errors: 0, Skipped: 11, Time elapsed: 19.023 s <<< FAILURE! - in org.apache.pulsar.broker.service.persistent.DelayedDeliveryTest
Error: testEnableAndDisableTopicDelayedDelivery(org.apache.pulsar.broker.service.persistent.DelayedDeliveryTest) Time elapsed: 0.048 s <<< FAILURE!
org.apache.pulsar.client.admin.PulsarAdminException$ServerSideErrorException: HTTP 500 Internal Server Error
at org.apache.pulsar.client.admin.internal.BaseResource.getApiException(BaseResource.java:219)
at org.apache.pulsar.client.admin.internal.TopicsImpl$25.failed(TopicsImpl.java:1813)
at org.glassfish.jersey.client.JerseyInvocation$1.failed(JerseyInvocation.java:882)
at org.glassfish.jersey.client.JerseyInvocation$1.completed(JerseyInvocation.java:863)
at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:229)
at org.glassfish.jersey.client.ClientRuntime.access$200(ClientRuntime.java:62)
at org.glassfish.jersey.client.ClientRuntime$2.lambda$response$0(ClientRuntime.java:173)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288)
at org.glassfish.jersey.client.ClientRuntime$2.response(ClientRuntime.java:173)
at org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector.lambda$apply$1(AsyncHttpConnector.java:212)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
at org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector.lambda$retryOperation$4(AsyncHttpConnector.java:254)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
at org.asynchttpclient.netty.NettyResponseFuture.loadContent(NettyResponseFuture.java:222)
at org.asynchttpclient.netty.NettyResponseFuture.done(NettyResponseFuture.java:257)
at org.asynchttpclient.netty.handler.AsyncHttpClientHandler.finishUpdate(AsyncHttpClientHandler.java:241)
at org.asynchttpclient.netty.handler.HttpHandler.handleChunk(HttpHandler.java:114)
at org.asynchttpclient.netty.handler.HttpHandler.handleRead(HttpHandler.java:143)
at org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:78)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:960)
at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:82)
... 54 more
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865472781
@Anonymitaet No, this is a bug fix.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865093565
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865468882
I will fix this flaky test
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui merged pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 removed a comment on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
315157973 removed a comment on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865468882
I will fix this flaky test
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865080247
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865476822
@codelipenghui https://github.com/apache/pulsar/pull/11009 PTAL
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865080247
What if we set TTL? Compression may not be triggered in the future, because the threshold `brokerServiceCompactionThresholdInBytes` is not reached
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865093565
@315157973 TTL and inactive topic deletion are not worked on SystemTopic, you see here https://github.com/apache/pulsar/blob/d1a439b3c18f72736c6331d58d151bc23c0628ca/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/SystemTopic.java#L49-L55
It doesn't matter if `brokerServiceCompactionThresholdInBytes` is reached or not, we just ensure the __compaction subscription has created when creating the __change_events topic, if the next compaction task triggered but not reaches the `brokerServiceCompactionThresholdInBytes`, will skip the compaction and waiting for the next compaction task to compact the data. So it's ok for this case, if the data not get compacted, we will read from the original topic directly.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 removed a comment on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
315157973 removed a comment on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865468882
I will fix this flaky test
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Anonymitaet commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865469387
@codelipenghui thanks for your contribution. For this PR, do we need to update docs?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] 315157973 commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
315157973 commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865472594
> ```
> Error: Tests run: 19, Failures: 5, Errors: 0, Skipped: 11, Time elapsed: 19.023 s <<< FAILURE! - in
Master branch also has this problem
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] Anonymitaet commented on pull request #11003: Fix potential data lost on the system topic when topic compaction have not triggered yet
Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #11003:
URL: https://github.com/apache/pulsar/pull/11003#issuecomment-865469387
@codelipenghui thanks for your contribution. For this PR, do we need to update docs?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org