Open andrii0lomakin opened 11 years ago
In theory we could store the sql command as payload. I was thinking to other stuff like "alter database dateformat yyyy-MM-dd". If we had such log we could totally remove the server's log used in replication!
SQL commands, does not work on data store level. For example if server fails in the middle of SQL command execution, it can not be restored from failed state using such approach. In order to support durability feature all operations should be logged on disk operations level (or more precisely on disk cache level). Also all SQL commands are translated in record changes, so such commands like ""alter database dateformat " which causes code:
case DATETIMEFORMAT:
storage.getConfiguration().dateTimeFormat = stringValue;
storage.getConfiguration().update();
break;
public void update() throws OSerializationException { final byte[] record = toStream(); storage .updateRecord(CONFIG_RID, record, OVersionFactory.instance().createUntrackedVersion(), ORecordBytes.RECORD_TYPE, 0, null); }
are already durable and transactional in plocal storage.
The only problem is cluster creation, truncation and deletion. If we add log events for this type of actions they will be durable too. But all "alter database" commands are transactional now, that is why I thought about moving auto sharding solution from storage level to cluster level (in https://github.com/orientechnologies/orientdb/issues/1600 issue).
:+1:
))
Hi guys, any news about this proposal?
Thanks
In plocal storage it is relatively simple to make schema changes transnational. Document changes are transnational now, so we need only to add log messages related to file/cluster creation which will be rolled back or committed during transaction rollback/commit accordingly.
This change allow completely align blueprints and OrientDB models.