[ https://issues.apache.org/jira/browse/RYA-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15336392#comment-15336392 ]
ASF GitHub Bot commented on RYA-51: ----------------------------------- Github user isper3at commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/48#discussion_r67537827 --- Diff: dao/mongodb.rya/src/main/java/mvm/rya/mongodb/MongoDBRyaDAO.java --- @@ -179,85 +145,85 @@ public void destroy() throws RyaDAOException { IOUtils.closeQuietly(queryEngine); } - public void add(RyaStatement statement) throws RyaDAOException { - // add it to the collection - try { - coll.insert(storageStrategy.serialize(statement)); - for(RyaSecondaryIndexer index: secondaryIndexers) { - index.storeStatement(statement); - } - } - catch (com.mongodb.MongoException.DuplicateKey exception){ - // ignore - } - catch (com.mongodb.DuplicateKeyException exception){ - // ignore - } - catch (Exception ex){ - // ignore single exceptions - ex.printStackTrace(); - } - } - - public void add(Iterator<RyaStatement> statement) throws RyaDAOException { - List<DBObject> dbInserts = new ArrayList<DBObject>(); - while (statement.hasNext()){ - RyaStatement ryaStatement = statement.next(); - DBObject insert = storageStrategy.serialize(ryaStatement); - dbInserts.add(insert); - + @Override + public void add(final RyaStatement statement) throws RyaDAOException { + // add it to the collection + try { + coll.insert(storageStrategy.serialize(statement)); + for(final RyaSecondaryIndexer index: secondaryIndexers) { + index.storeStatement(statement); + } + } catch (final IOException e) { --- End diff -- since both are just ignored and the actual exception that is caught is a type of IOException it makes it more clear where the exception is coming from. Its dangerous to catch exceptions just to ignore... > Temporal indexing support for MongoDB > ------------------------------------- > > Key: RYA-51 > URL: https://issues.apache.org/jira/browse/RYA-51 > Project: Rya > Issue Type: New Feature > Components: dao > Reporter: Puja Valiyil > Assignee: Puja Valiyil > > There should be temporal indexing support for Mongo DB backed Rya. i imagine > this would be implemented using another collection, similar to how temporal > indexing is implemented in Rya with a supplementary table. -- This message was sent by Atlassian JIRA (v6.3.4#6332)