From commits-return-1619-apmail-usergrid-commits-archive=usergrid.apache.org@usergrid.incubator.apache.org Wed Feb 12 13:21:26 2014 Return-Path: X-Original-To: apmail-usergrid-commits-archive@minotaur.apache.org Delivered-To: apmail-usergrid-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ABB2D10E1F for ; Wed, 12 Feb 2014 13:21:26 +0000 (UTC) Received: (qmail 48383 invoked by uid 500); 12 Feb 2014 13:21:26 -0000 Delivered-To: apmail-usergrid-commits-archive@usergrid.apache.org Received: (qmail 48342 invoked by uid 500); 12 Feb 2014 13:21:25 -0000 Mailing-List: contact commits-help@usergrid.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@usergrid.incubator.apache.org Delivered-To: mailing list commits@usergrid.incubator.apache.org Received: (qmail 47424 invoked by uid 99); 12 Feb 2014 13:21:11 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Feb 2014 13:21:11 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 5B01655DB3; Wed, 12 Feb 2014 13:21:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: snoopdave@apache.org To: commits@usergrid.apache.org Date: Wed, 12 Feb 2014 13:21:19 -0000 Message-Id: <57e676fa33fc419a8863c9fdf6e07c5d@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [11/50] git commit: Added comments for review Added comments for review Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/e38dda9d Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/e38dda9d Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/e38dda9d Branch: refs/heads/optimistic-tx-semantics Commit: e38dda9d9965b018aad6563459e99545c0e73843 Parents: 2c6e7e4 Author: Todd Nine Authored: Wed Jan 29 18:34:55 2014 -0700 Committer: Todd Nine Committed: Wed Jan 29 18:34:55 2014 -0700 ---------------------------------------------------------------------- .../collection/mvcc/stage/write/WriteUniqueVerify.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e38dda9d/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java index 5ddd519..818a01d 100644 --- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java +++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java @@ -51,6 +51,7 @@ public class WriteUniqueVerify private final UniqueValueSerializationStrategy uniqueValueStrat; + //TODO Dave, we don't want to use our own thread pool. Use the Concurrent class to create new observables private final ExecutorService threadPool; private final int MAX_THREAD_COUNT; @@ -82,6 +83,11 @@ public class WriteUniqueVerify final Entity entity = ioevent.getEvent().getEntity().get(); // use simple thread pool to verify fields in parallel + + //TODO We don't want to use custom thread pools and futures here. + // We want to use concurrent to fork all validations this way they're wrapped by timeouts and + // Hystrix thread pools for JMX operations. See the WriteCommand in the EntityCollectionManagerImpl + // I think it still needs added to the Concurrent utility class final List> results = new ArrayList>();