Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

live select seems broken in v3 (develop) #7761

Closed
pvalsecc opened this issue Sep 21, 2017 · 12 comments
Closed

live select seems broken in v3 (develop) #7761

pvalsecc opened this issue Sep 21, 2017 · 12 comments
Assignees

Comments

@pvalsecc
Copy link

pvalsecc commented Sep 21, 2017

OrientDB Version: edd0276

Java Version: 1.8.0_131

OS: Ubuntu 17.04

Expected behavior

I do on a freshly created DB:

CREATE CLASS Test EXTENDS V
CREATE PROPERTY Test.x STRING
LIVE SELECT FROM Test

I expect to receive notifications when stuff is added to the Test table.

Actual behavior

Instead, I get a NPE:

Exception `4AE37055` in storage `test`
com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.LIVE SELECT FROM Test
        DB name="test"
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3492)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3408)
        at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:78)
        at com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery.run(OSQLAsynchQuery.java:74)
        at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:86)
        at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:33)
        at com.orientechnologies.orient.core.sql.query.OLiveQuery.execute(OLiveQuery.java:70)
        at com.orientechnologies.orient.server.OConnectionBinaryExecutor.executeCommand(OConnectionBinaryExecutor.java:576)
        at com.orientechnologies.orient.client.remote.message.OCommandRequest.execute(OCommandRequest.java:103)
        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.sessionRequest(ONetworkProtocolBinary.java:279)
        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:185)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Caused by: java.lang.NullPointerException
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentEmbedded.copy(ODatabaseDocumentEmbedded.java:302)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect$1.call(OCommandExecutorSQLLiveSelect.java:65)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect.execInSeparateDatabase(OCommandExecutorSQLLiveSelect.java:142)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect.execute(OCommandExecutorSQLLiveSelect.java:63)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3471)
        ... 11 more

With 2.2.24, it works fine.

Steps to reproduce

See "Expected behavior "

@pvalsecc pvalsecc changed the title live select seems broken in v3 (develop live select seems broken in v3 (develop) Sep 21, 2017
@luigidellaquila
Copy link
Member

Hi @pvalsecc

How are you executing these statements? Can you please post a Java snippet?

Thanks

Luigi

@luigidellaquila
Copy link
Member

Oh, I think I got the problem, are you using "root" user?

Thanks

Luigi

@luigidellaquila luigidellaquila self-assigned this Sep 22, 2017
@pvalsecc
Copy link
Author

I develop an Erlang client library.
Yes, I use root. Those are automated tests that create a fresh DB and run everything as root.

@luigidellaquila
Copy link
Member

Ok, the problem is clear, we have to change a little bit the logic to manage server level users.
Assigning to @tglman for a check
Thanks

Luigi

@tglman
Copy link
Member

tglman commented Oct 3, 2017

hi @pvalsecc,

Just pushed a fix for this issue on develop branch, closing.

Bye

@tglman tglman closed this as completed Oct 3, 2017
@pvalsecc
Copy link
Author

pvalsecc commented Oct 3, 2017

Just tested develop. It's so broken at it's core that I cannot even create a database with it. Even with the web interface (studio).
I did:

mvn clean
mvn install -DskipTests
cd distribution/target/orientdb-community-3.0.0-SNAPSHOT.dir/orientdb-community-3.0.0-SNAPSHOT
bin/server.sh
# set the root passord

When I try to create a DB, it shows 505 StackOverflowError with nothing in the logs.

@luigidellaquila
Copy link
Member

Hi @pvalsecc

I'm checking it, there seems to be a problem in the build.
I got an error 505 but not a StackOverflowError, do you have a stack trace?

Thanks

Luigi

luigidellaquila added a commit that referenced this issue Oct 4, 2017
@luigidellaquila
Copy link
Member

Hi @pvalsecc

Sorry, one of last commits created a problem with the authentication, I just reverted it, now it works fine

Thanks

Luigi

tglman added a commit that referenced this issue Oct 4, 2017
…ication, added test case for server security,issue #7761

This reverts commit 55c8cba.
@pvalsecc
Copy link
Author

pvalsecc commented Oct 4, 2017

@luigidellaquila No, no stacktrace. Checked stdout and the log file.

@tglman
Copy link
Member

tglman commented Oct 4, 2017

hi @pvalsecc,

I found the issue, it was due to the security plugin that was off in our test environments, I added tests with the security plugin on, this should be fixed now.

I'll reopen it, please close it if you can verify that is fixed.

@tglman tglman reopened this Oct 4, 2017
@pvalsecc
Copy link
Author

pvalsecc commented Oct 5, 2017

OK, tested with 5afc7ad and there is some progress. I can create the DB, subscribe to the live select, but the RID that comes in the push notification is wrong.

I create a record using "INSERT INTO Test (x) VALUES ('X')", The command returns a correct RID (#25:0), but the notification I get from my livre subscription has RID=#25:-2. I guess you send the notification before assigning the cluster position.

Do you want me to open a new issue or we continue on this one?

@pvalsecc
Copy link
Author

I've created another issue: #7828

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants