Class MongoDBUpsertRetryer

java.lang.Object
org.graylog2.database.MongoDBUpsertRetryer

public class MongoDBUpsertRetryer extends Object
MongoDB upsert requests can fail when they are creating a new entry concurrently. https://jira.mongodb.org/browse/SERVER-14322 This helper can be used to retry upserts if they throw a DuplicateKeyException
  • Constructor Details

    • MongoDBUpsertRetryer

      public MongoDBUpsertRetryer()
  • Method Details

    • run

      public static <T> T run(Callable<T> c)