[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115923#comment-16115923
 ] 

ASF subversion and git services commented on ASTERIXDB-2019:
------------------------------------------------------------

Commit 06478601cb1cb34363a38f630a0a00e98b782c25 in asterixdb's branch 
refs/heads/master from [~mhubail]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=0647860 ]

[ASTERIXDB-2019][CLUS] Sync getting cluster state

user model changes: no
storage format changes: no
interface changes: no

Details:
- Leave it to the caller when to refresh the cluster state
  after register/deregister of cluster partitions.
- Synchronize cluster state to avoid getting invalid state
  during partitions reg/dereg

Change-Id: I2bc5f86cedeb4728ccbb9811a36a4655a7786246
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1920
Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mb...@apache.org>


> ArithmeticException encountered when the cluster doesn't have any partitions
> ----------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-2019
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2019
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: CLUS - Cluster management
>            Reporter: Murtadha Hubail
>            Assignee: Murtadha Hubail
>
> When the cluster doesn't have any partitions it is still in the ACTIVE 
> state!! and when it receives a request, the following exception is 
> encountered:
> {code:java}
> 2017-07-31T02:49:28.801-07:00 INFO CBAS.translator.QueryTranslator 
> [QueryTranslator] / by zero
> java.lang.ArithmeticException: / by zero
>       at 
> org.apache.hyracks.algebricks.core.jobgen.impl.JobBuilder.<init>(JobBuilder.java:87)
>  ~[algebricks-core-0.3.2-SNAPSHOT.jar:0.3.2-SNAPSHOT]
>       at 
> org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlan(PlanCompiler.java:58)
>  ~[algebricks-core-0.3.2-SNAPSHOT.jar:0.3.2-SNAPSHOT]
>       at 
> org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.createJob(HeuristicCompilerFactoryBuilder.java:107)
>  ~[algebricks-compiler-0.3.2-SNAPSHOT.jar:0.3.2-SNAPSHOT]
>       at 
> org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:333)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1834)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.lambda$handleQuery$1(QueryTranslator.java:2307)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.createAndRunJob(QueryTranslator.java:2407)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.deliverResult(QueryTranslator.java:2347)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.handleQuery(QueryTranslator.java:2319)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:370)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.message.ExecuteStatementRequestMessage.lambda$handle$0(ExecuteStatementRequestMessage.java:127)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
> [?:1.8.0_121]
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> [?:1.8.0_121]
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [?:1.8.0_121]
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [?:1.8.0_121]
>       at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
> 2017-07-31T02:49:28.802-07:00 ERRO CBAS.apache.asterix [QueryTranslator] 
> Unexpected exception
> java.lang.ArithmeticException: / by zero
>       at 
> org.apache.hyracks.algebricks.core.jobgen.impl.JobBuilder.<init>(JobBuilder.java:87)
>  ~[algebricks-core-0.3.2-SNAPSHOT.jar:0.3.2-SNAPSHOT]
>       at 
> org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlan(PlanCompiler.java:58)
>  ~[algebricks-core-0.3.2-SNAPSHOT.jar:0.3.2-SNAPSHOT]
>       at 
> org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.createJob(HeuristicCompilerFactoryBuilder.java:107)
>  ~[algebricks-compiler-0.3.2-SNAPSHOT.jar:0.3.2-SNAPSHOT]
>       at 
> org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:333)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1834)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.lambda$handleQuery$1(QueryTranslator.java:2307)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.createAndRunJob(QueryTranslator.java:2407)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.deliverResult(QueryTranslator.java:2347)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.handleQuery(QueryTranslator.java:2319)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:370)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.message.ExecuteStatementRequestMessage.lambda$handle$0(ExecuteStatementRequestMessage.java:127)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
> [?:1.8.0_121]
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> [?:1.8.0_121]
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [?:1.8.0_121]
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [?:1.8.0_121]
>       at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
> 2017-07-31T02:49:28.802-07:00 WARN 
> CBAS.message.ExecuteStatementRequestMessage [QueryTranslator] 
> java.lang.NullPointerException
> java.lang.NullPointerException: null
>       at 
> org.apache.asterix.messaging.CCMessageBroker.sendApplicationMessageToNC(CCMessageBroker.java:72)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> org.apache.asterix.app.message.ExecuteStatementRequestMessage.lambda$handle$0(ExecuteStatementRequestMessage.java:144)
>  ~[asterix-app-0.9.2-SNAPSHOT.jar:0.9.2-SNAPSHOT]
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
> [?:1.8.0_121]
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> [?:1.8.0_121]
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [?:1.8.0_121]
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [?:1.8.0_121]
>       at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to