You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/04/30 06:41:23 UTC

[GitHub] [shardingsphere] sandynz opened a new issue, #17228: ShardingSphereLock.releaseLock could ignore operation if caller doesn't own the lock

sandynz opened a new issue, #17228:
URL: https://github.com/apache/shardingsphere/issues/17228

   ## Feature Request
   
   ### Is your feature request related to a problem?
   To some degree.
   
   Scaling job preparation failed, then it emit releaseLock.
   ```
   [ERROR] 2022-04-30 12:01:40.132 [elasticjob-0130317c30317c3054317c7363616c696e675f6462-1] o.a.s.e.e.h.g.LogJobErrorHandler - Job '0130317c30317c3054317c7363616c696e675f6462' exception occur in job processing
   org.apache.shardingsphere.data.pipeline.core.exception.PipelineJobCreationException: Can not split by primary key range for table t_order_0
   	at org.apache.shardingsphere.data.pipeline.scenario.rulealtered.prepare.InventoryTaskSplitter.getInventoryPositions(InventoryTaskSplitter.java:150)
   ```
   Related scaling job status:
   ```
   mysql> show scaling status 0130317c30317c3054317c7363616c696e675f6462;
   +------+-------------+--------------------------+--------+-------------------------------+--------------------------+
   | item | data_source | status                   | active | inventory_finished_percentage | incremental_idle_seconds |
   +------+-------------+--------------------------+--------+-------------------------------+--------------------------+
   | 0    | ds_0        | PREPARING_FAILURE        | true   | 0                             | 0                        |
   | 1    | ds_1        | EXECUTE_INCREMENTAL_TASK | true   | 100                           | 61                       |
   +------+-------------+--------------------------+--------+-------------------------------+--------------------------+
   2 rows in set (0.03 sec)
   ```
   
   Exception occur:
   ```
   四月 30, 2022 12:01:40 下午 com.google.common.eventbus.EventBus$LoggingHandler handleException
   严重: Exception thrown by subscriber method scalingReleaseDatabaseLevelLock(org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.config.event.rule.ScalingReleaseDatabaseLevelLockEvent) on subscriber org.apache.shardingsphere.data.pipeline.scenario.rulealtered.RuleAlteredJobWorker@7fc1fd31 when dispatching event: org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.config.event.rule.ScalingReleaseDatabaseLevelLockEvent@24bb2c96
   org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryException: java.lang.IllegalMonitorStateException: You do not own the lock: /lock/standard/locks/scaling_db
   	at org.apache.shardingsphere.mode.repository.cluster.zookeeper.handler.CuratorZookeeperExceptionHandler.handleException(CuratorZookeeperExceptionHandler.java:53)
   	at org.apache.shardingsphere.mode.repository.cluster.zookeeper.lock.ZookeeperInternalLockHolder$ZookeeperInternalLock.unlock(ZookeeperInternalLockHolder.java:117)
   	at org.apache.shardingsphere.mode.manager.cluster.coordinator.lock.standard.service.StandardLockRegistryService.releaseLock(StandardLockRegistryService.java:45)
   	at org.apache.shardingsphere.mode.manager.cluster.coordinator.lock.standard.ShardingSphereStandardLock.releaseLock(ShardingSphereStandardLock.java:48)
   	at org.apache.shardingsphere.data.pipeline.core.lock.PipelineSimpleLock.releaseLock(PipelineSimpleLock.java:87)
   	at org.apache.shardingsphere.data.pipeline.scenario.rulealtered.RuleAlteredJobWorker.scalingReleaseDatabaseLevelLock(RuleAlteredJobWorker.java:319)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87)
   	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:144)
   	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72)
   	at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
   	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67)
   	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:108)
   	at com.google.common.eventbus.EventBus.post(EventBus.java:212)
   	at org.apache.shardingsphere.data.pipeline.scenario.rulealtered.RuleAlteredJob.execute(RuleAlteredJob.java:60)
   	at org.apache.shardingsphere.elasticjob.simple.executor.SimpleJobExecutor.process(SimpleJobExecutor.java:33)
   	at org.apache.shardingsphere.elasticjob.simple.executor.SimpleJobExecutor.process(SimpleJobExecutor.java:29)
   	at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.process(ElasticJobExecutor.java:172)
   	at org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor.lambda$process$0(ElasticJobExecutor.java:153)
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
   	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
   	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
   	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)
   Caused by: java.lang.IllegalMonitorStateException: You do not own the lock: /lock/standard/locks/scaling_db
   	at org.apache.curator.framework.recipes.locks.InterProcessMutex.release(InterProcessMutex.java:140)
   	at org.apache.shardingsphere.mode.repository.cluster.zookeeper.lock.ZookeeperInternalLockHolder$ZookeeperInternalLock.unlock(ZookeeperInternalLockHolder.java:113)
   	... 27 more
   ```
   
   ### Describe the feature you would like.
   ShardingSphereLock.releaseLock could ignore operation if caller doesn't own the lock.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz closed issue #17228: ShardingSphereLock.releaseLock could ignore operation if caller doesn't own the lock

Posted by GitBox <gi...@apache.org>.
sandynz closed issue #17228: ShardingSphereLock.releaseLock could ignore operation if caller doesn't own the lock
URL: https://github.com/apache/shardingsphere/issues/17228


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] soulasuna commented on issue #17228: ShardingSphereLock.releaseLock could ignore operation if caller doesn't own the lock

Posted by GitBox <gi...@apache.org>.
soulasuna commented on issue #17228:
URL: https://github.com/apache/shardingsphere/issues/17228#issuecomment-1119275550

   @zjcnb assign to me


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zjcnb commented on issue #17228: ShardingSphereLock.releaseLock could ignore operation if caller doesn't own the lock

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #17228:
URL: https://github.com/apache/shardingsphere/issues/17228#issuecomment-1113949134

   @soulasuna Can you take a look at this question?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org