Using IDocumentSession after calling Dispose results in random exceptions

80 views
Skip to first unread message

Espen Røvik Larsen

unread,
Aug 22, 2019, 9:24:13 AM8/22/19
to RavenDB - 2nd generation document database
Basically my own fault, but it took me a good while to figure it out. Maybe an ObjectDisposedException could be thrown if one uses a disposed document session.

NOTE: This happened during unit testing with RavenDB.TestDriver.

Exceptions I got was:

System.InvalidOperationException: Attempt to allocate from reset arena without calling renew

System.ArgumentOutOfRangeException: Position cannot be negative, but was -3617 Parameter name: pos

Oren Eini (Ayende Rahien)

unread,
Aug 22, 2019, 10:30:37 AM8/22/19
to ravendb
The issue is usually that users are doing that with async tasks.
So they start an async task, and then try to dispose the session. There is no good way to handle this issue that doesn't impose a too high a performance penalty

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/76e3d8a7-8381-4119-957a-735c42dd0769%40googlegroups.com.


--
Oren Eini
CEO   /   Hibernating Rhinos LTD
Skype:  ayenderahien
Support:  sup...@ravendb.net
Reply all
Reply to author
Forward
0 new messages