tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45222] concurrent startup of ReplicatedMap leads to inconsistent state.
Date Tue, 17 Jun 2008 22:19:34 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45222





--- Comment #1 from Robert Newson <robert.newson@gmail.com>  2008-06-17 15:19:34 PST
---

Here's the simplest code to reproduce it. Just start this on four machines at
the same time (I used clusterssh). Most of the time each box will print a
different value from 1-4.

As a meta-question, is ReplicatedMap a supported Tribes feature or a demo? I've
been stung on this kind of thing with JGroups before (their .blocks are almost
all demo code, apparently).

        public static void main(String[] args) throws Exception {
                final GroupChannel channel = new GroupChannel();
                final ReplicatedMap map = new ReplicatedMap(null, channel, 0,
"map",
                                null);
                channel.start(Channel.DEFAULT);
                map.put(InetAddress.getLocalHost(), "1");
                while (true) {
                        System.out.printf("member_count: %,d, map_size: %,d\n",
channel
                                        .getMembers().length, map.size());
                        SECONDS.sleep(5);
                }
        }


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message