[Bro] more &synchronized questions

David Mandelberg david at mandelberg.org
Wed Apr 10 08:24:24 PDT 2013


Hi,

How does &synchronized work with records? E.g., in the below code, is the
effect of two cluster nodes simultaneously running ++foos[0]$foo similar to
simultaneously running ++bars[0]? Or would there be a conflict causing
foos[0]$foo to only be incremented once?

type Foo: record {
    foo: count &default=0;
}

global foos: table[count] of Foo &default=[] &synchronized;
global bars: table[count] of count &default=0 &synchronized;

Also, does a "X += N" instruction propagate to all nodes as "increment by
N" or as "set to X+N?"

-- 
David Eric Mandelberg / dseomn
http://david.mandelberg.org/



More information about the Bro mailing list