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

[2.0.2] order by @rid desc query generates error #3618

Closed
dlaberge opened this issue Feb 18, 2015 · 4 comments
Closed

[2.0.2] order by @rid desc query generates error #3618

dlaberge opened this issue Feb 18, 2015 · 4 comments
Assignees
Milestone

Comments

@dlaberge
Copy link

This issues seems to be related to #2966. I'm currently running a document database with the version 2.0.2

Here is the error I get from the console :

2015-02-18 10:17:32:478 SEVERE Internal server error: com.orientechnologies.common.io.OIOException: You cannot access outside the file  size (0 bytes). You have requested portion -65536-0 bytes. File: File: formula. cpm os-size=1024, stored=0, filled=0, max=0 [ONetworkProtocolHttpDb]

A quick overview of the db structure:

Entity (abstract)
    -> Formula
        -> DiscountFormula                  (count : 2)
        -> GeneralFeeFormula             (count : 12)
        -> InstallationFeeFormula         (count : 3)
        -> ProfitFeeFormula                  (count : 1)

The error occurs on query

select from formula order by @rid desc

There is no error if the desc instruction is not present, when the query is run from the studio

Here is the error I got when the query is created with the Java API, the error is display in loop.

févr. 18, 2015 11:05:47 AM com.orientechnologies.common.log.OLogManager log WARNING: Connection re-acquired transparently after 7ms and 1 retries to server 'orientdb:2424/CBWeb': no errors will be thrown at application level

févr. 18, 2015 11:05:47 AM com.orientechnologies.common.log.OLogManager log WARNING: Caught I/O errors from orientdb/127.0.0.1:2424 (local socket=/127.0.0.1:51695), trying to reconnect (error: com.orientechnologies.common.io.OIOException: You cannot access outside the file size (0 bytes). You have requested portion -65536-0 bytes. File: File: formula.cpm os-size=1024, stored=0, filled=0, max=0)

févr. 18, 2015 11:05:47 AM com.orientechnologies.common.log.OLogManager log SEVERE: Removing disconnected network channel 'orientdb:2424/CBWeb'...

Here is the Java code :

List<ODocument> resultset = getDatabase()
                .query(new OSQLSynchQuery<ODocument>(
                        String.format(
                                "select from %s order by @rid desc",
                                className), 1).setFetchPlan(fetchPlan));
@lvca
Copy link
Member

lvca commented Feb 18, 2015

The problem seems related to the polymorphism + order by @Rid desc -> inverted iterator

@dlaberge
Copy link
Author

Any updates on that issue?

@lvca lvca removed the sql label Apr 6, 2015
@luigidellaquila
Copy link
Member

Hi @dlaberge
I was not able to reproduce the problem on v 2.1 (btw, #2966 was fixed some time ago)
Could you please confirm that the problem is fixed?

@dlaberge
Copy link
Author

Forgot about this issue. Closing ...

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

4 participants