racker/graylog2-server — pull request #2 by gdusbabek (2012-02-10 21:04:05+00:00)
Title: Fix concurrency error in MessageCountWriterThread

It has a timer that pulls maps and sends them to mongo. If another thread updates those maps while mongo is iterating over them, this error happens.

The java solution is to wrap those maps in an unmodifiable collection, essentially producing a copy-on-read map.