dsukhoroslov / bagri

XML/Document DB on top of distributed cache
Apache License 2.0
41 stars 5 forks source link

[Core] exception on document processing if admin connects #127

Closed dsukhoroslov closed 6 years ago

dsukhoroslov commented 6 years ago

run YCSB WLE test against local Bagri server. starting Admin server at the same time. After admin connects to node all subsequent YCSB requests failed with error:

2017-12-13 13:32:16.383 [Thread-4] ERROR com.bagri.client.hazelcast.impl.DocumentManagementImpl - runIterableDocumentTask; error getting result
java.util.concurrent.ExecutionException: com.hazelcast.core.HazelcastException: com.bagri.core.api.BagriException: User guest has no permission to read documents
        at com.hazelcast.client.spi.impl.ClientInvocationFuture.resolveAndThrowIfException(ClientInvocationFuture.java:108) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.client.spi.impl.ClientInvocationFuture.resolveAndThrowIfException(ClientInvocationFuture.java:32) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.spi.impl.AbstractInvocationFuture.get(AbstractInvocationFuture.java:183) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.client.util.ClientDelegatingFuture.get(ClientDelegatingFuture.java:127) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.client.util.ClientDelegatingFuture.get(ClientDelegatingFuture.java:118) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.bagri.client.hazelcast.impl.DocumentManagementImpl.runIterableDocumentTask(DocumentManagementImpl.java:237) [bagri-client-hazelcast-1.2.0-SNAPSHOT.jar:na]
        at com.bagri.client.hazelcast.impl.DocumentManagementImpl.getDocuments(DocumentManagementImpl.java:117) [bagri-client-hazelcast-1.2.0-SNAPSHOT.jar:na]
        at com.bagri.test.ycsb.BagriDocClient.scan(BagriDocClient.java:88) [bagri-test-ycsb-1.2.0-SNAPSHOT.jar:na]
        at com.yahoo.ycsb.DBWrapper.scan(DBWrapper.java:158) [core-0.13.0-SNAPSHOT.jar:na]
        at com.yahoo.ycsb.workloads.CoreWorkload.doTransactionScan(CoreWorkload.java:756) [core-0.13.0-SNAPSHOT.jar:na]
        at com.yahoo.ycsb.workloads.CoreWorkload.doTransaction(CoreWorkload.java:614) [core-0.13.0-SNAPSHOT.jar:na]
        at com.yahoo.ycsb.ClientThread.run(Client.java:446) [core-0.13.0-SNAPSHOT.jar:na]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]
Caused by: com.hazelcast.core.HazelcastException: com.bagri.core.api.BagriException: User guest has no permission to read documents
        at com.hazelcast.util.ExceptionUtil.peel(ExceptionUtil.java:94) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.util.ExceptionUtil.peel(ExceptionUtil.java:56) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.util.ExceptionUtil.peel(ExceptionUtil.java:52) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.sendClientMessage(AbstractMessageTask.java:218) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.client.impl.protocol.task.AbstractMessageTask.handleProcessingFailure(AbstractMessageTask.java:162) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.client.impl.protocol.task.AbstractInvocationMessageTask.onFailure(AbstractInvocationMessageTask.java:56) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.spi.impl.AbstractInvocationFuture$1.run(AbstractInvocationFuture.java:246) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_74]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_74]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]
        at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at ------ submitted from ------.(Unknown Source) ~[na:na]
        at com.hazelcast.client.spi.impl.ClientInvocationFuture.resolveAndThrowIfException(ClientInvocationFuture.java:95) ~[hazelcast-all-3.8.7.jar:3.8.7]
        ... 12 common frames omitted
Caused by: com.hazelcast.client.UndefinedErrorCodeException: Class name : com.bagri.core.api.BagriException , Message :User guest has no permission to read documents
        at com.bagri.server.hazelcast.impl.AccessManagementImpl.checkPermission(AccessManagementImpl.java:82) ~[na:na]
        at com.bagri.server.hazelcast.task.doc.DocumentsProvider.call(DocumentsProvider.java:28) ~[na:na]
        at com.bagri.server.hazelcast.task.doc.DocumentsProvider.call(DocumentsProvider.java:13) ~[na:na]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_74]
        at com.hazelcast.executor.impl.DistributedExecutorService$CallableProcessor.run(DistributedExecutorService.java:241) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:227) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_74]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_74]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]
        at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at ------ submitted from ------.(Unknown Source) ~[na:na]
        at com.hazelcast.spi.impl.operationservice.impl.InvocationFuture.resolve(InvocationFuture.java:114) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.spi.impl.AbstractInvocationFuture$1.run(AbstractInvocationFuture.java:243) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_74]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_74]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_74]
        at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64) ~[hazelcast-all-3.8.7.jar:3.8.7]
        at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80) ~[hazelcast-all-3.8.7.jar:3.8.7]
dsukhoroslov commented 6 years ago

fixed