sandynz commented on pull request #12267:
URL: https://github.com/apache/shardingsphere/pull/12267#issuecomment-914279259
Consumer (`PGReplicationStream`) must be closed before drop replication
slot, else exception thrown:
```
o.a.s.s.c.j.p.ScalingJobPreparer - Scaling job destroying failed
org.postgresql.util.PSQLException: ERROR: replication slot
"sharding_scaling" is active for PID 76289
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
at
org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:132)
at
com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at
org.apache.shardingsphere.scaling.postgresql.component.PostgreSQLPositionInitializer.dropSlotIfExists(PostgreSQLPositionInitializer.java:116)
at
org.apache.shardingsphere.scaling.postgresql.component.PostgreSQLPositionInitializer.destroy(PostgreSQLPositionInitializer.java:103)
at
org.apache.shardingsphere.scaling.core.job.preparer.ScalingJobPreparer.cleanup(ScalingJobPreparer.java:113)
at
org.apache.shardingsphere.scaling.core.job.schedule.JobScheduler.stop(JobScheduler.java:57)
at
org.apache.shardingsphere.scaling.core.job.schedule.JobSchedulerCenter.stop(JobSchedulerCenter.java:76)
at
org.apache.shardingsphere.scaling.core.executor.job.ScalingJobExecutor.lambda$watchGovernanceRepositoryConfiguration$0(ScalingJobExecutor.java:62)
at
org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository.lambda$watch$1(CuratorZookeeperRepository.java:247)
at
org.apache.curator.framework.recipes.cache.TreeCacheListenerWrapper.sendEvent(TreeCacheListenerWrapper.java:71)
at
org.apache.curator.framework.recipes.cache.TreeCacheListenerWrapper.event(TreeCacheListenerWrapper.java:48)
at
org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.lambda$event$0(CuratorCacheListenerBuilderImpl.java:149)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at
org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.event(CuratorCacheListenerBuilderImpl.java:149)
at
org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$putStorage$6(CuratorCacheImpl.java:274)
at
org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92)
at
org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89)
at
org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89)
at
org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$callListeners$10(CuratorCacheImpl.java:293)
at
java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1640)
at
java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```
--
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]