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

Manual "dictionary" indices are empty after DB crash #1761

Closed
giastfader opened this issue Oct 23, 2013 · 7 comments
Closed

Manual "dictionary" indices are empty after DB crash #1761

giastfader opened this issue Oct 23, 2013 · 7 comments
Assignees
Milestone

Comments

@giastfader
Copy link
Contributor

Hi,
I think I have found a problem with the latest 1.6.0-snapshot version (downloaded this morning).
In short: After a system crash, all manual dictionaries are empty.

Step to reproduce the bug:
Environment: Windows 7 or CentOS 6.2
OrientDB version: 1.6.0-snapshot downloaded on October 23th 2013
Step to reproduce the behaviour:
start the console and then input the following commands:

create database plocal:/temp/test admin admin plocal graph
create index testdictionary dictionary
insert into V (name) values ("test")
insert into index:testdictionary (key,rid) values ("key",#9:0)

Note: the '#9:0' RID is the document just created at statement 4
Check the index:

     orientdb> select from index:testdictionary
     ----+------+----+----
     #   |@RID  |key |rid
     ----+------+----+----
     0   |#-1:-1|key |#9:0
     ----+------+----+----

Now close the terminal WITHOUT exiting from within the console, in this way we simulate a system crash. This works in Windows.
Now let's reconnect to the db in a new terminal window:

OrientDB console v.1.6.0-SNAPSHOT (build @BUILD@) www.orientechnologies.com
Type 'help' to display all the commands supported.
Installing extensions for GREMLIN language v.2.5.0-SNAPSHOT

orientdb> connect plocal:/temp/test admin admin
Connecting to database [plocal:/temp/test] with user 'admin'...
2013-10-23 18:18:30:526 WARN segment file 'database.ocf' was not closed correctly last time [OSingleFileSegment]
2013-10-23 18:18:30:579 WARN Storage test was not closed properly. Will try to restore from write ahead log. [OLocalPaginatedStorage]
2013-10-23 18:18:30:584 WARN Record OCheckpointEndRecord{lsn=OLogSequenceNumber{segment=0, position=136810}} will be skipped during data restore. [OLo
calPaginatedStorage]
OK
orientdb>
2013-10-23 18:18:30:954 SEVE getDataSegmentIdByName: Local paginated storage does not support data segments. -1 will be returned for data segment inde
x. [OLocalPaginatedStorage]
2013-10-23 18:18:30:983 SEVE addDataSegment: Local paginated storage does not support data segments, segment index will not be added in directory null
. [OLocalPaginatedStorage]

Check the index:

orientdb> select from index:testdictionary
0 item(s) found. Query executed in 0.0010 sec(s).
orientdb>
@ghost ghost assigned andrii0lomakin Oct 23, 2013
@giastfader
Copy link
Contributor Author

Hi,
any news on this?

@andrii0lomakin
Copy link
Member

HI,
We need to implement special atomic operation propagation approach we are
working on this but it is not in 1.6.

On Mon, Oct 28, 2013 at 11:43 AM, giastfader notifications@git.luolix.topwrote:

Hi,
any news on this?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1761#issuecomment-27198757
.

Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

@giastfader
Copy link
Contributor Author

mmm, so bad because server crash could cause information lost.
Is there a workaround? Are other indices affected too?

Thanks!

@andrii0lomakin
Copy link
Member

Hi,
No of course not ).
There are several modes of work with indexes:

  1. In tx mode index and data operations are logged and restored after
    server crash. I can use following modes: rollback only for indexes, full
    restore. In rollback only mode indexes are rebuilt in full mode they are
    restored from operations log.
    2 In non tx mode data operations are logged and indexes are rebuilt.

On Mon, Oct 28, 2013 at 12:34 PM, giastfader notifications@git.luolix.topwrote:

mmm, so bad because server crash could cause information lost.
Is there a workaround? Are other indices affected too?

Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/1761#issuecomment-27201444
.

Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

@lvca
Copy link
Member

lvca commented Mar 24, 2014

We should configure manual indexes to always use WAL

@lvca
Copy link
Member

lvca commented Apr 3, 2014

@Laa what's the ETA to always configure WAL with manual indexes?

@andrii0lomakin
Copy link
Member

@lvca I set it.

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