orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

so easy to broke db?

Open spanyukov opened this issue 8 years ago • 11 comments

OrientDB Version:

Java Version:

OS:

debian 9, orietdb 3.0

Expected behavior

working condition

Actual behavior

Once I decided to alter column type. I dont remember exactly the types but it could be byte and integer. Then somehow I got error about value range and after page reload I saw that orientdb saved this range.. I was working with db for a days without critical errors except that I always saw the same errors after altering column. And recently I decided to reload db server... Since I cant connect to the db from anywhere. I see this error and cannot access to the db and I dont even know where error is. the error:

code:500
content:"java.lang.NumberFormatException: Value out of range. Value:"256" Radix:10"
reason:500

lost my DB

Steps to reproduce

spanyukov avatar Feb 07 '18 13:02 spanyukov

@futureglorydev could you provide me exception which you get now? Do you work on a single server or distributed database?

andrii0lomakin avatar Feb 07 '18 14:02 andrii0lomakin

@futureglorydev could you send me server log? Are you able to access DB from plocal: connection?

andrii0lomakin avatar Feb 07 '18 14:02 andrii0lomakin

@laa Its single server. Exact version of DB:

OrientDB console v.3.0.0m1 (build 63b896d280caa08f511517a6e35978d214ffea47)

Error from the console (after I got error about range):

orientdb> connect plocal://opt/orientdb/databases/my_db root root_password

Connecting to database [plocal://opt/orientdb/databases/my_db] with user 'root'... Error: com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open database 'my_db'

Error: com.orientechnologies.orient.core.exception.OStorageException: Database is locked by another process, please shutdown process and try again

Error from the console (first time error, after rebooting db):

orientdb> connect plocal://opt/orientdb/databases/my_db root root_password

Connecting to database [plocal://opt/orientdb/databases/my_db] with user 'root'... Error: com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open database 'my_db'

Error: com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open database url=plocal:/opt/orientdb/databases/my_db

Error: java.lang.NumberFormatException: Value out of range. Value:"256" Radix:10

spanyukov avatar Feb 07 '18 14:02 spanyukov

@laa full log log.zip

spanyukov avatar Feb 07 '18 14:02 spanyukov

@laa I`ve got the same error on new RC1 version on my new just created DB I just added new datetime attribute to my class and I got an error http://joxi.ru/Y2Lz9a9tnPXJBr After restarting I cant access my db again..

spanyukov avatar Feb 13 '18 11:02 spanyukov

@futureglorydev in your case there are three issues. First of all RC1 version is quite old, all fixes are in the latest snapshot (we pushed changes a few days ago). We are going to release RC2 soon. Second I suppose that you crashed DB (according to the log) and it was restored incorrectly. And third I suppose you have issues with database configuration. I will ping you when we release RC2 so you can retry. Could you send me your DB btw so I will inspect it?

andrii0lomakin avatar Feb 13 '18 12:02 andrii0lomakin

@futureglorydev I have been working on durability feature last days, so your issue appeared just in time, but if your database is not restored again after DB crash, probably that is because you use relatively old version. But your issue with "Value out of range" is something different. I would be glad if you send me the database to inspect it.

andrii0lomakin avatar Feb 13 '18 12:02 andrii0lomakin

@laa I would love to restore but I cant do it. Here is 2 databases both are broken sk_dev.zip test.zip

spanyukov avatar Feb 13 '18 13:02 spanyukov

@laa I think it happened after I added attribute with type of 'BYTE' and pointed range 0-256(I thought its possible but max value is 127 even though value range starts from 0). After deletion this filed db goes to normal. Is it possible to restore DB without accessing to it?

spanyukov avatar Feb 13 '18 13:02 spanyukov

@futureglorydev I will inspect your database tomorrow and will let you know

andrii0lomakin avatar Feb 14 '18 13:02 andrii0lomakin

Fixed in 3.0

andrii0lomakin avatar May 04 '18 03:05 andrii0lomakin