Page 1 of 1

SubsetIsAllSet cause locking?

Posted: Mon Aug 19, 2013 2:04 am
by Jason Dawson
We're having some issues with locking and I'm trying to troubleshoot. Does SubsetIsAllSet function cause locking? From the reference guide for the Flag param:

"Any non-zero value specifies that the subset uses all the current elements from the parent dimension and will dynamically update to use all elements from the parent dimension whenever the subset is called."

I couldn't find anything on the forum where this was discussed. Any input would be appreciated.

Thanks.

Re: SubsetIsAllSet cause locking?

Posted: Mon Aug 19, 2013 9:29 am
by rmackenzie
Tricky question... my take on this would be the command behaves similarly to a dynamic subset using the TM1SubsetAll command - TI has simply implemented a convenient way of achieving this. Are you using this command for convenience, or is it absolutely necessary? A possible alternative would be to set the data source of the TI to the ALL subset of the dimension in question. Can you try that?

IBM have published some information on this topic and having a google may help you find more. If you are on 10.1.x then you can try using this parameter to mitigate the effects of locking due to dynamic subset recalculation - UseLocalCopiesforPublicDynamicSubsets.

Finally, you could try testing for yourself:

Code: Select all

# Prolog code
# create 'all' subset in order to induce a possible lock
sDimName = 'YOUR_DIM_NAME';
sSubName = 'YOUR_SUB_NAME';
SubsetIsAllSet ( sDimName, sSubName, 1 );

# Epilog code
# count to a lot to waste time
# allowing time to run another TI
nCounter = 10000000;
WHILE ( nCounter > 0 );
  nCounter = nCounter - 1;
END;
Run that TI, and then immediately afterward, run another and see if queues up. If it has to wait, then I'd say that you've ascertained that using SubsetIsAllSet causes a lock using that dimension.

HTH.

Re: SubsetIsAllSet cause locking?

Posted: Tue Aug 20, 2013 4:35 am
by Jason Dawson
Thanks for your response. We don't have to use the code and frankly it's not used a lot in our implementation, but it is sprinkled in here and there. Running a search of my ti processes returns some results that I was surprised by (scripts I wasn't expecting to use it), so it led me here to see if anyone had experienced locking with this function before. We typically use either All or a standard generated system level 0 subset that's refreshed when our hierarchies are updated. But, you know how it is with multiple developers from different backgrounds. Things creep in that you weren't expecting. I don't know for sure that this is causing a lock, but my suspicion is the same as yours.

If I can do some more testing with the approach you've suggested, I'll report back my findings.

We're only on 9.5.2 at this point, but I'll remember that parameter for future use. Thanks!