On Fri, Oct 25, 2013 at 9:40 AM, Pavel Levshin <[email protected]> wrote:

>
> Your example suggests usage of state variables for counting:
>
> set $/var = $/var + 1;
>
>
It's not inteded to suggest, I just wanted to use one that's most
problematic.


> And, indeed, it will work as expected. Each message will get it's number
> in shadow copy.
>
> But what if a user tries this (to retain previous value, for example):
>
> set $.local = $/var;
> set $/var  = $/var + 1;
>
> $/var will be shadowed at first statement, but modified AND propagated at
> second one.


This would violate restriction 1 ("no update after initial access") and
lead to a runtime error. But I guess you looked at the pseudocode, and
indeed it was missing the reset of the modifiable attribute (which enforces
that restriction).

Do you agree?


> Therefore, it will count for batches in this case. It looks like
> propagation must also be restricted to first access only.
>
>
> --
> Pavel Levshin
>
>
> 25.10.2013 11:10, Rainer Gerhards:
>
>> Hi all,
>>
>> I thought out the details of what I have on my mind and think the solution
>> can work and support all known use cases. I've also managed to write it
>> down this morning:
>>
>> http://blog.gerhards.net/2013/**10/a-proposal-for-rsyslog-**
>> state-variables.html<http://blog.gerhards.net/2013/10/a-proposal-for-rsyslog-state-variables.html>
>>
>> I would appreciate if you could check it and see how the spec can be
>> technically broken or identify use cases which it will not be able to
>> handle.
>>
>> Looking forward to the discussion!
>>
>> Rainer
>> ______________________________**_________________
>> rsyslog mailing list
>> http://lists.adiscon.net/**mailman/listinfo/rsyslog<http://lists.adiscon.net/mailman/listinfo/rsyslog>
>> http://www.rsyslog.com/**professional-services/<http://www.rsyslog.com/professional-services/>
>> What's up with rsyslog? Follow https://twitter.com/rgerhards
>> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
>> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
>> DON'T LIKE THAT.
>>
>
> ______________________________**_________________
> rsyslog mailing list
> http://lists.adiscon.net/**mailman/listinfo/rsyslog<http://lists.adiscon.net/mailman/listinfo/rsyslog>
> http://www.rsyslog.com/**professional-services/<http://www.rsyslog.com/professional-services/>
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
> DON'T LIKE THAT.
>
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to