This isn't a bug, this is a feature, this is the way as transactions works.

When you process a transaction, all operations, which updates the database, are buffered on the client side and are sent to the server for execution while leto_CommitTransaction().
So, before the leto_CommitTransaction() is complete, the database on the server isn't updated and the records are not added.

 

Last edit: Alexander S.Kresin 2015-06-17