System.InvalidOperationException: Attempt to write to a read-only page
See original GitHub issueThis is a big issue I encounter once in a while using BrightstarDB.
When doing some
context.DeleteObject(myobject);
context.SaveChanges();
I will be able to call it dozens and dozens of times, but at some point (often when I delete 5 to 10 objects in a row) this error will came up :
System.InvalidOperationException: Attempt to write to a read-only page à BrightstarDB.Rdf.NTriplesParser.Parse(TextReader reader, ITripleSink sink, String defaultGraphUri) à BrightstarDB.Server.GuardedUpdateTransaction.Run() BrightstarDB Error: 400 : Error Processing Transaction System.InvalidOperationException: Attempt to write to a read-only page à BrightstarDB.Rdf.NTriplesParser.Parse(TextReader reader, ITripleSink sink, String defaultGraphUri) à BrightstarDB.Server.GuardedUpdateTransaction.Run() à BrightstarDB.Server.StoreWorker.ProcessJobs(Object state) Exception thrown: ‘BrightstarDB.Client.BrightstarClientException’ in BrightstarDB.dll
Passed this point, any entity from the type of the entity i want to delete will turn undeletable, every attempt ending with the same error message. Yet i’m still able to create, modifiy, delete other types of entities, this one turn into a dead end. The only two solutions then are :
- To wipe out the entire database and restart from scratch.
- (After doing step 1 ) To edit the model of the object and add a Property DeletionRecquired, and hide from user every entity with this property set to true (and obviously edit whole program to handle this case)
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (2 by maintainers)
Top GitHub Comments
… but I must also mention that I have added consolidation to my rewrite store on application startup. So that definitely did happen.
Okay I finally reproduced the bug ! https://drive.google.com/open?id=0B98ZSzSdzS7UM3ZmUml6OW93aXM
You just have to run this for a few minutes, then stop it, comment out the method DataCreationRoutine() and you should have the error about Readonly Page when clicking on the “Delete All Classical Datas” button