I'm making some tests using ManagedEsent interface and I wonder if someone here can clarify on this:
- Inside a transaction I do an update(insert a record) and then rollback the transaction
If I look at the database with EseDatabaseView I can see the "uncommitted" record listed in the table. Going esent.dll again doesn't give me the record.
So, using the esent api the record is not committed (and not visible); and using EDV (I guess it reads directly from the file) the record is there.
Is this "normal" behaviour, does ESENT "always" write record into the file and if it is not committed it just does not reads it? Is it a bug in EDV showing it then? Or I'm missing something here?
Judging by the description of EseDatabaseView ('esent.dll (The dll file of Extensible Storage Engine) is not required to read the database.'), it sounds like they try to read the database file directly, not using the ESE APIs.
Is the database shut down cleanly first? Confirm with
esentutl -mh [database name]
, which dumps the database header. Look for something like 'Dirty Shutdown' or 'Clean Shutdown'.Dirty Shutdown: You may see transactions that have not been committed (or rolled back). You need the information in the transaction log files to bring it to a clean state. Clean Shutdown: Everything is in a clean state. You could potentially delete the log files if you want.
My guess is that the database was shut down in a dirty state, and the tool is reading the data that hasn't yet been rolled back.
-martin