Distributed: INSERT creates multiple records
orientdb {db=test}> create class SMS;
Class created successfully. Total classes in database now: 11
orientdb {db=test}> insert into sms (type, lang, source, content) values ( 'notify', 'en', 1, 'This is a test');
Inserted record 'SMS#23:0{type:notify,lang:en,source:1,content:This is a test} v1' in 0.003000 sec(s).
orientdb {db=test}> select * from sms;
----+-----+------+------+----+------+--------------
# |@RID |@CLASS|type |lang|source|content
----+-----+------+------+----+------+--------------
0 |#23:0|SMS |notify|en |1 |This is a test
1 |#23:1|SMS |notify|en |1 |This is a test
----+-----+------+------+----+------+--------------
2 item(s) found. Query executed in 0.001 sec(s).
What version?
Latest 2.0 SNAPSHOT
Did you use "remote:" protocol?
Yes
Fixed in the last 2.0-SNAPSHOT. Please can you check it?
I started with the latest SNAPSHOT and a fresh database. INSERT still creates two records. One for each node I presume.
Inserted record 'SMS#18:0{type:notify,lang:en,source:1,content:This is a test} v1' in 0.635000 sec(s).
orientdb {db=test}> select * from SMS;
----+-----+------+------+----+------+--------------
# |@RID |@CLASS|type |lang|source|content
----+-----+------+------+----+------+--------------
0 |#18:0|SMS |notify|en |1 |This is a test
1 |#18:1|SMS |notify|en |1 |This is a test
----+-----+------+------+----+------+--------------
2 item(s) found. Query executed in 0.243 sec(s).
orientdb {db=test}> insert into sms (type, lang, source, content) values ( 'notify', 'en', 1, 'This is a test');
Inserted record 'SMS#18:2{type:notify,lang:en,source:1,content:This is a test} v1' in 0.001000 sec(s).
orientdb {db=test}> select * from SMS;
----+-----+------+------+----+------+--------------
# |@RID |@CLASS|type |lang|source|content
----+-----+------+------+----+------+--------------
0 |#18:0|SMS |notify|en |1 |This is a test
1 |#18:1|SMS |notify|en |1 |This is a test
2 |#18:2|SMS |notify|en |1 |This is a test
3 |#18:3|SMS |notify|en |1 |This is a test
----+-----+------+------+----+------+--------------
4 item(s) found. Query executed in 0.002 sec(s).
orientdb {db=test}>
I tried and works correctly. My console:
MacBook-Pro:bin luca$ ./console.sh
OrientDB console v.2.0-SNAPSHOT (build 2568) www.orientechnologies.com
Type 'help' to display all the supported commands.
Installing extensions for GREMLIN language v.2.6.0
orientdb> connect remote:localhost/GratefulDeadConcerts admin admin
Connecting to database [remote:localhost/GratefulDeadConcerts] with user 'admin'...OK
DISTRIBUTED CONFIGURATION:
{
"members": [{
"id": "0a26fe6a-4f3c-4a09-a086-1be579a35fe6",
"name": "node1418142450964",
"startedOn": "2014-12-09 16:27:29",
"listeners": [{"protocol":"ONetworkProtocolBinary","listen":"10.3.15.55:2424"},{"protocol":"ONetworkProtocolHttpDb","listen":"10.3.15.55:2480"}],
"databases": []
},{
"id": "532a884c-d5e7-4066-a01c-7986c2cd0683",
"name": "root",
"startedOn": "2014-12-09 16:27:41",
"listeners": [{"protocol":"ONetworkProtocolBinary","listen":"10.3.15.55:2425"},{"protocol":"ONetworkProtocolHttpDb","listen":"10.3.15.55:2481"}],
"databases": []
}
],
"localName": "_hzInstance_1_orientdb",
"localId": "0a26fe6a-4f3c-4a09-a086-1be579a35fe6"
}
orientdb {db=GratefulDeadConcerts}> create class SMS
Class created successfully. Total classes in database now: 13
orientdb {db=GratefulDeadConcerts}> insert into sms (type, lang, source, content) values ( 'notify', 'en', 1, 'This is a test');
Inserted record 'SMS#21:0{type:notify,lang:en,source:1,content:This is a test} v1' in 0,012000 sec(s).
orientdb {db=GratefulDeadConcerts}> select from SMS
----+-----+------+------+----+------+--------------
# |@RID |@CLASS|type |lang|source|content
----+-----+------+------+----+------+--------------
0 |#21:0|SMS |notify|en |1 |This is a test
----+-----+------+------+----+------+--------------
1 item(s) found. Query executed in 0.002 sec(s).
orientdb {db=GratefulDeadConcerts}>
Perhaps executionMode asynchronous causing the problem?
{
"autoDeploy": true,
"hotAlignment": false,
"executionMode": "asynchronous",
"readQuorum": 1,
"writeQuorum": 1,
"failureAvailableNodesLessQuorum": false,
"readYourWrites": true,
"clusters": {
"internal": {
},
"index": {
},
"*": {
"servers" : [ "<NEW_NODE>" ]
}
}
}
Confirm, with asynchronous this problem appears. Reopening it...
Closed. Please retry with last.
Confirmed, this problem appears fixed.