> Can this kind of exception occur when one Transaction is writing a
> document and another is trying to read it (with default transaction
> settings)?
And can I check if no changes have been made to a loaded document int he .net client and savechanges is called whilst another client is writing to the document - would this cause a concurrency issue or does the first client know that there is no stale data?
On 22 May 2012, at 12:24, "Oren Eini (Ayende Rahien)" <aye...@ayende.com> wrote:
> On Tue, May 22, 2012 at 12:28 PM, lunarjetset <pete.nel...@workfu.com> wrote:
> Can this kind of exception occur when one Transaction is writing a
> document and another is trying to read it (with default transaction
> settings)?
On Tue, May 22, 2012 at 6:37 PM, Pete Nelson <pete.nel...@workfu.com> wrote:
> And can I check if no changes have been made to a loaded document int he
> .net client and savechanges is called whilst another client is writing to
> the document - would this cause a concurrency issue or does the first
> client know that there is no stale data?
> On 22 May 2012, at 12:24, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
> wrote:
> No, only when both are trying to write.
> On Tue, May 22, 2012 at 12:28 PM, lunarjetset <pete.nel...@workfu.com>wrote:
>> Can this kind of exception occur when one Transaction is writing a
>> document and another is trying to read it (with default transaction
>> settings)?
Edited to improve readability:
if no changes have been made to a loaded document by a .net client and savechanges is called whilst another client is writing to the document - would this cause a concurrency issue or does the first client know that there is no stale data?
On 22 May 2012, at 12:24, "Oren Eini (Ayende Rahien)" <aye...@ayende.com> wrote:
> On Tue, May 22, 2012 at 12:28 PM, lunarjetset <pete.nel...@workfu.com> wrote:
> Can this kind of exception occur when one Transaction is writing a
> document and another is trying to read it (with default transaction
> settings)?
> Pete,
> You can check for no changes using session.Advanced.HasChanged
> I don't understand the rest of the question
> On Tue, May 22, 2012 at 6:37 PM, Pete Nelson <pete.nel...@workfu.com> wrote:
> And can I check if no changes have been made to a loaded document int he .net client and savechanges is called whilst another client is writing to the document - would this cause a concurrency issue or does the first client know that there is no stale data?
> On 22 May 2012, at 12:24, "Oren Eini (Ayende Rahien)" <aye...@ayende.com> wrote:
>> No, only when both are trying to write.
>> On Tue, May 22, 2012 at 12:28 PM, lunarjetset <pete.nel...@workfu.com> wrote:
>> Can this kind of exception occur when one Transaction is writing a
>> document and another is trying to read it (with default transaction
>> settings)?
On Tue, May 22, 2012 at 6:49 PM, Pete Nelson <pete.nel...@workfu.com> wrote:
> Edited to improve readability:
> if no changes have been made to a loaded document by a .net client and
> savechanges is called whilst another client is writing to the document -
> would this cause a concurrency issue or does the first client know that
> there is no stale data?
> On 22 May 2012, at 12:24, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
> wrote:
> No, only when both are trying to write.
> On Tue, May 22, 2012 at 12:28 PM, lunarjetset <pete.nel...@workfu.com>wrote:
>> Can this kind of exception occur when one Transaction is writing a
>> document and another is trying to read it (with default transaction
>> settings)?
OK I managed to seemingly fix the problem but it has come up again.
I need to try and think of a way to debug this so if you have any thoughts how to debug that would be great:
- There is a webapp with SaveChanges being called at the end of the request cycle on OnActionExecuted
- There is a Raven plugin (RequestResponder) that uses Database.TransactionalStorage.Batch to save some data from SQL Server when the plugin is called.
- Sometimes (due to a race-condition) after the plugin has run and the webapp calls SaveChanges we get the ConcurrencyException even though we have NOT made any changes to any Documents in the web app.
It seems maybe the webapp SaveChanges triggers something that is queued to be saved but I don't really understand this area.
if you could give me an idea how to debug that would be really helpful,
> No, SaveChanges is a no op if there hasn't been any changes.
> On Tue, May 22, 2012 at 6:49 PM, Pete Nelson <pete.nel...@workfu.com > <mailto:pete.nel...@workfu.com>> wrote:
> Edited to improve readability:
> if no changes have been made to a loaded document by a .net
> client and savechanges is called whilst another client is writing
> to the document - would this cause a concurrency issue or does the
> first client know that there is no stale data?
> On 22 May 2012, at 12:24, "Oren Eini (Ayende Rahien)"
> <aye...@ayende.com <mailto:aye...@ayende.com>> wrote:
>> No, only when both are trying to write.
>> On Tue, May 22, 2012 at 12:28 PM, lunarjetset
>> <pete.nel...@workfu.com <mailto:pete.nel...@workfu.com>> wrote:
>> Can this kind of exception occur when one Transaction is
>> writing a
>> document and another is trying to read it (with default
>> transaction
>> settings)?
SaveChanges NEVER TOUCHES THE SERVER if there hasn't been something to
change.
Let us first concentrate on this. Can you check that the client goes to the
server even when you think that there shouldn't be any changes?
On Wed, May 23, 2012 at 10:25 AM, Pete Nelson <pete.nel...@workfu.com>wrote:
> OK I managed to seemingly fix the problem but it has come up again.
> I need to try and think of a way to debug this so if you have any thoughts
> how to debug that would be great:
> - There is a webapp with SaveChanges being called at the end of the
> request cycle on OnActionExecuted
> - There is a Raven plugin (RequestResponder) that uses
> Database.TransactionalStorage.Batch to save some data from SQL Server when
> the plugin is called.
> - Sometimes (due to a race-condition) after the plugin has run and the
> webapp calls SaveChanges we get the ConcurrencyException even though we
> have NOT made any changes to any Documents in the web app.
> It seems maybe the webapp SaveChanges triggers something that is queued to
> be saved but I don't really understand this area.
> if you could give me an idea how to debug that would be really helpful,
> thanks
> Pete
> No, SaveChanges is a no op if there hasn't been any changes.
> On Tue, May 22, 2012 at 6:49 PM, Pete Nelson <pete.nel...@workfu.com>wrote:
>> Edited to improve readability:
>> if no changes have been made to a loaded document by a .net client and
>> savechanges is called whilst another client is writing to the document -
>> would this cause a concurrency issue or does the first client know that
>> there is no stale data?
>> On 22 May 2012, at 12:24, "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
>> wrote:
>> No, only when both are trying to write.
>> On Tue, May 22, 2012 at 12:28 PM, lunarjetset <pete.nel...@workfu.com>wrote:
>>> Can this kind of exception occur when one Transaction is writing a
>>> document and another is trying to read it (with default transaction
>>> settings)?
On Wednesday, May 23, 2012 1:13:56 PM UTC+1, Oren Eini wrote:
> SaveChanges NEVER TOUCHES THE SERVER if there hasn't been something to > change. > Let us first concentrate on this. Can you check that the client goes to > the server even when you think that there shouldn't be any changes?
> On Wed, May 23, 2012 at 10:25 AM, Pete Nelson <pete.nel...@workfu.com>wrote:
>> Hi,
>> OK I managed to seemingly fix the problem but it has come up again.
>> I need to try and think of a way to debug this so if you have any >> thoughts how to debug that would be great:
>> - There is a webapp with SaveChanges being called at the end of the >> request cycle on OnActionExecuted >> - There is a Raven plugin (RequestResponder) that uses >> Database.TransactionalStorage.Batch to save some data from SQL Server when >> the plugin is called. >> - Sometimes (due to a race-condition) after the plugin has run and the >> webapp calls SaveChanges we get the ConcurrencyException even though we >> have NOT made any changes to any Documents in the web app.
>> It seems maybe the webapp SaveChanges triggers something that is queued >> to be saved but I don't really understand this area.
>> if you could give me an idea how to debug that would be really helpful,
>> thanks >> Pete
>> No, SaveChanges is a no op if there hasn't been any changes.
>> On Tue, May 22, 2012 at 6:49 PM, Pete Nelson <pete.nel...@workfu.com>wrote:
>>> Edited to improve readability: >>> if no changes have been made to a loaded document by a .net client and >>> savechanges is called whilst another client is writing to the document - >>> would this cause a concurrency issue or does the first client know that >>> there is no stale data?
>>> On 22 May 2012, at 12:24, "Oren Eini (Ayende Rahien)" <aye...@ayende.com> >>> wrote:
>>> No, only when both are trying to write.
>>> On Tue, May 22, 2012 at 12:28 PM, lunarjetset <pete.nel...@workfu.com>wrote:
>>>> Can this kind of exception occur when one Transaction is writing a >>>> document and another is trying to read it (with default transaction >>>> settings)?