Github user RalphSu commented on a diff in the pull request: https://github.com/apache/incubator-eagle/pull/566#discussion_r85466631 --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/main/java/org/apache/eagle/alert/metadata/impl/MongoMetadataDaoImpl.java --- @@ -127,41 +157,41 @@ private void init() { BsonDocument doc1 = new BsonDocument(); IndexOptions io1 = new IndexOptions().background(true).name("versionIndex"); doc1.append("version", new BsonInt32(1)); - scheduleStates = db.getCollection("schedule_specs"); + scheduleStates = getCollection("schedule_specs"); scheduleStates.createIndex(doc1, io1); - spoutSpecs = db.getCollection("spoutSpecs"); + spoutSpecs = getCollection("spoutSpecs"); { IndexOptions ioInternal = new IndexOptions().background(true).name("topologyIdIndex"); BsonDocument docInternal = new BsonDocument(); docInternal.append("topologyId", new BsonInt32(1)); spoutSpecs.createIndex(docInternal, ioInternal); } - alertSpecs = db.getCollection("alertSpecs"); + alertSpecs = getCollection("alertSpecs"); { IndexOptions ioInternal = new IndexOptions().background(true).name("topologyNameIndex"); BsonDocument docInternal = new BsonDocument(); docInternal.append("topologyName", new BsonInt32(1)); alertSpecs.createIndex(docInternal, ioInternal); } - groupSpecs = db.getCollection("groupSpecs"); + groupSpecs = getCollection("groupSpecs"); --- End diff -- The getCollection method will make all the collection as capped. Capped should only apply for collections that related to schedule specs that listed on the jira. Please make sure the impact of the code change.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---