[
https://issues.apache.org/jira/browse/EAGLE-683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15614584#comment-15614584
]
ASF GitHub Bot commented on EAGLE-683:
--------------------------------------
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.
> AlertEngine : Improve metadata store performance
> ------------------------------------------------
>
> Key: EAGLE-683
> URL: https://issues.apache.org/jira/browse/EAGLE-683
> Project: Eagle
> Issue Type: Improvement
> Affects Versions: v0.5.0
> Reporter: Su Ralph
> Assignee: Zeng, Bryant
> Fix For: v0.5.0
>
>
> Currently, we enable periodically schedule in coordinator service itself. If
> this is enabled, the schedule spec will finally used up metadata storage.
> We should
> 1. Disable periodically schedule by default (storage like mysql doesn't have
> capped feature)
> 2. For mongodb storage, use capped collection for schedule_specs,
> policy_snapshots, streamSnapshots, groupSpecs, alertSpecs, monitoredStreams,
> spoutSpecs (all schedule spec related collection).
> Let use default config of 20,000 as capped collection size.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)