Confused about read only conflicts and RcIdentityBag

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Confused about read only conflicts and RcIdentityBag

GLASS mailing list
Hi,

I have some collections that will be likely accessed and read from a few gems, quite possible at the same time. Since these collections will be written quite infrequently (and when done probably at a cron job at night), I thought I needed no RC class. However, I am reading the ProgGuide about RcIdenityBag and says:

However, no conflict occurs on instances of RcIdentityBag when any of these conditions exists: 

Any number of users read objects in the bag at the same time. 

So that means that if I do not use a RcIdentityBag (say I am using an OrderedCollection or SortedCollection), then multiple users cannot read the collection at the same time? mmmmmm sounds weird.

If this is not the case, then I think the guide is confusing.

Thanks in advance, 

--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Confused about read only conflicts and RcIdentityBag

GLASS mailing list


On 08/06/2015 11:43 AM, Mariano Martinez Peck via Glass wrote:
Hi,

I have some collections that will be likely accessed and read from a few gems, quite possible at the same time. Since these collections will be written quite infrequently (and when done probably at a cron job at night), I thought I needed no RC class. However, I am reading the ProgGuide about RcIdenityBag and says:

However, no conflict occurs on instances of RcIdentityBag when any of these conditions exists: 

Any number of users read objects in the bag at the same time. 

So that means that if I do not use a RcIdentityBag (say I am using an OrderedCollection or SortedCollection), then multiple users cannot read the collection at the same time? mmmmmm sounds weird.

If this is not the case, then I think the guide is confusing.

I think the docs are confusing (sort of) ... we do have a conflict mode called a READ-WRITE conflict (see table 8-1 in the Committing Transactions section [1] of the programmers guide) and that is where objects in the StrongReadSet intersect the WriteSetUnion, but objects are not added to the StrongReadSet (a hidden set) unless you do it yourself ...

So the comment in the docs are basically referring to the fact that the RcIdentityBag does not automatically add objects to the StrongReadSet ... this was done because in earlier versions of the product objects were added to the StrongReadSet automatically ... but that hasn't been done for awhile ...

I will submit an issue about this ... thanks for noticing!

Dale

[1] http://downloads.gemtalksystems.com/docs/GemStone64/3.2.x/GS64-ProgGuide-3.2/8-Transactions.htm#pgfId-170009

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Confused about read only conflicts and RcIdentityBag

GLASS mailing list


On Thu, Aug 6, 2015 at 4:01 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On 08/06/2015 11:43 AM, Mariano Martinez Peck via Glass wrote:
Hi,

I have some collections that will be likely accessed and read from a few gems, quite possible at the same time. Since these collections will be written quite infrequently (and when done probably at a cron job at night), I thought I needed no RC class. However, I am reading the ProgGuide about RcIdenityBag and says:

However, no conflict occurs on instances of RcIdentityBag when any of these conditions exists: 

Any number of users read objects in the bag at the same time. 

So that means that if I do not use a RcIdentityBag (say I am using an OrderedCollection or SortedCollection), then multiple users cannot read the collection at the same time? mmmmmm sounds weird.

If this is not the case, then I think the guide is confusing.

I think the docs are confusing (sort of) ... we do have a conflict mode called a READ-WRITE conflict (see table 8-1 in the Committing Transactions section [1] of the programmers guide) and that is where objects in the StrongReadSet intersect the WriteSetUnion, but objects are not added to the StrongReadSet (a hidden set) unless you do it yourself ...

So the comment in the docs are basically referring to the fact that the RcIdentityBag does not automatically add objects to the StrongReadSet ... this was done because in earlier versions of the product objects were added to the StrongReadSet automatically ... but that hasn't been done for awhile ...

I will submit an issue about this ... thanks for noticing!

Ok, thanks for the clarification.

 

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass