alibaba / wasp

megastore-like system
http://alibaba.github.io/wasp/
Apache License 2.0
189 stars 80 forks source link

disable failed while one table has a child table which is enabled ,after that,the father table can neither be disabled nor enabled #22

Closed twinklestart closed 11 years ago

twinklestart commented 11 years ago

Disable table fails while this table has a child table which is still enabled ,after that,the father table can neither be disabled nor enabled i.e.

table user has a child table photo, then i did the following steps:

disable 'user' there was nothing displayed on the cosole,so i checked the master log ,found following log

2013-09-25 10:11:13,708 INFO com.alibaba.wasp.master.handler.DisableTableHandler: lock table 'user' by DisableTableHandler 2013-09-25 10:11:13,711 INFO com.alibaba.wasp.master.handler.DisableTableHandler: Attempting to disable table user 2013-09-25 10:11:13,719 ERROR com.alibaba.wasp.master.handler.DisableTableHandler: Error trying to disable table user com.alibaba.wasp.NotAllChildTableDisableException: photo, at com.alibaba.wasp.master.handler.DisableTableHandler.handleDisableTable(DisableTableHandler.java:140) at com.alibaba.wasp.master.handler.DisableTableHandler.process(DisableTableHandler.java:108) at com.alibaba.wasp.executor.EventHandler.run(EventHandler.java:198) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)

then do this

disable 'photo'

it's disabled

then i disable 'user' again , i got the following things

wasp(main):016:0> disable 'user'

ERROR: com.alibaba.wasp.TableNotEnabledException: user

Here is some help for this command: Start disable of named table: e.g. "hbase> disable 't1'"

wasp(main):017:0> enable 'user'

ERROR: com.alibaba.wasp.TableNotDisabledException: user

Here is some help for this command: Start enable of named table: e.g. "wasp> enable 't1'"

i checked the USER status on master website http://fmaster:45051/table.jsp?name=USER

Table USER

Table Attributes

Attribute Name Value Description Enabled true Is the table enabled

so what happened to the table ''user''?

jaywong85 commented 11 years ago

yes. so you must disable all child tables first