orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

[2.0.2] order by @rid desc query generates error

Open dlaberge opened this issue 11 years ago • 4 comments

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));

dlaberge avatar Feb 18 '15 15:02 dlaberge

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

lvca avatar Feb 18 '15 17:02 lvca

Any updates on that issue?

dlaberge avatar Mar 17 '15 10:03 dlaberge

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?

luigidellaquila avatar Sep 23 '15 13:09 luigidellaquila

Forgot about this issue. Closing ...

dlaberge avatar Sep 23 '15 15:09 dlaberge