[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-03 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995660#comment-15995660
 ] 

ASF subversion and git services commented on GEODE-2828:


Commit 480a1e05cd5bc332c1e5e2593c3468f640ded1c0 in geode's branch 
refs/heads/feature/GEM-1353 from [~nnag]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=480a1e0 ]

GEODE-2828: AEQ created before the Lucene user regions

* AEQ is being created before the Lucene user region
* A countdown latch prevents the index repository computation until the 
user regions are ready
* Integration tests do not use a Dummy executor because we need a 
thread pool for afterPrimary call.

This closes #481


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
> Fix For: 1.2.0
>
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15994275#comment-15994275
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user asfgit closed the pull request at:

https://github.com/apache/geode/pull/481


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15994274#comment-15994274
 ] 

ASF subversion and git services commented on GEODE-2828:


Commit 480a1e05cd5bc332c1e5e2593c3468f640ded1c0 in geode's branch 
refs/heads/develop from [~nnag]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=480a1e0 ]

GEODE-2828: AEQ created before the Lucene user regions

* AEQ is being created before the Lucene user region
* A countdown latch prevents the index repository computation until the 
user regions are ready
* Integration tests do not use a Dummy executor because we need a 
thread pool for afterPrimary call.

This closes #481


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991479#comment-15991479
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user jhuynh1 commented on a diff in the pull request:

https://github.com/apache/geode/pull/481#discussion_r114195735
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/AbstractPartitionedRepositoryManager.java
 ---
@@ -111,6 +121,10 @@ protected IndexRepository computeRepository(Integer 
bucketId) {
 return repo;
   }
 
+  protected void allowRepositoryComputation() {
--- End diff --

ah ok, makes more sense, I think my mind mistook this method name with 
allowing the repo to do computation rather than allowing computing of repository


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991292#comment-15991292
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user nabarunnag commented on a diff in the pull request:

https://github.com/apache/geode/pull/481#discussion_r114175681
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
 ---
@@ -78,17 +87,9 @@ protected RepositoryManager createRepositoryManager() {
 // create PR fileAndChunkRegion, but not to create its buckets for now
 final String fileRegionName = createFileRegionName();
 PartitionAttributes partitionAttributes = 
dataRegion.getPartitionAttributes();
-
-
-// create PR chunkRegion, but not to create its buckets for now
-
-// we will create RegionDirectories on the fly when data comes in
-HeterogeneousLuceneSerializer mapper = new 
HeterogeneousLuceneSerializer(getFieldNames());
-PartitionedRepositoryManager partitionedRepositoryManager =
-new PartitionedRepositoryManager(this, mapper);
 DM dm = 
this.cache.getInternalDistributedSystem().getDistributionManager();
 LuceneBucketListener lucenePrimaryBucketListener =
-new LuceneBucketListener(partitionedRepositoryManager, dm);
+new LuceneBucketListener((PartitionedRepositoryManager) 
partitionedRepositoryManager, dm);
--- End diff --

I made createLuceneListenerAndFileChunkRegion method take in 
PartitionedRepositoryManager
which removed all the casting in the LuceneIndexForPartitionRegion.java but 
I would like a suggestion on how to remove the casting in 
createLuceneListenersAndFileChunkRegions(  (PartitionedRepositoryManager) 
repositoryManager); in the LuceneIndexImpl.java file. As the repositoryManager 
is being created by createRepositoryManager() which creates  repository manager 
for both RawLuceneIndex as well as LuceneIndexForPartitionRegion


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991294#comment-15991294
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user nabarunnag commented on a diff in the pull request:

https://github.com/apache/geode/pull/481#discussion_r114175765
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
 ---
@@ -131,30 +131,41 @@ protected void initialize() {
 if (!hasInitialized) {
   /* create index region */
   dataRegion = getDataRegion();
-  // assert dataRegion != null;
-
-  repositoryManager = createRepositoryManager();
-
-  // create AEQ, AEQ listener and specify the listener to 
repositoryManager
-  createAEQ(dataRegion);
-
+  createLuceneListenersAndFileChunkRegions(
+  (AbstractPartitionedRepositoryManager) repositoryManager);
--- End diff --

Please refer to the comment above


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991185#comment-15991185
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user nabarunnag commented on a diff in the pull request:

https://github.com/apache/geode/pull/481#discussion_r114164780
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/AbstractPartitionedRepositoryManager.java
 ---
@@ -111,6 +121,10 @@ protected IndexRepository computeRepository(Integer 
bucketId) {
 return repo;
   }
 
+  protected void allowRepositoryComputation() {
--- End diff --

I was under the impression that the latch is waiting before 
indexRepositories.compute in the computeRepositories method call hence the repo 
was not created yet. But the coutdown allows it to move ahead an compute the 
repository.


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991155#comment-15991155
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user jhuynh1 commented on a diff in the pull request:

https://github.com/apache/geode/pull/481#discussion_r114161620
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/AbstractPartitionedRepositoryManager.java
 ---
@@ -111,6 +121,10 @@ protected IndexRepository computeRepository(Integer 
bucketId) {
 return repo;
   }
 
+  protected void allowRepositoryComputation() {
--- End diff --

Nitpick isn't this representing that the repository is ready for use?  
Should rename the latch and method to reflect this, such as readyForUse and 
enableRepositoryForUse? 


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991154#comment-15991154
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user jhuynh1 commented on a diff in the pull request:

https://github.com/apache/geode/pull/481#discussion_r114160633
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/AbstractPartitionedRepositoryManager.java
 ---
@@ -47,18 +48,22 @@
   new ConcurrentHashMap();
 
   /** The user region for this index */
-  protected final PartitionedRegion userRegion;
+  protected PartitionedRegion userRegion = null;
   protected final LuceneSerializer serializer;
   protected final LuceneIndexImpl index;
   protected volatile boolean closed;
+  private CountDownLatch isDataRegionReady = new CountDownLatch(1);
--- End diff --

Should this be final?


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991140#comment-15991140
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user upthewaterspout commented on a diff in the pull request:

https://github.com/apache/geode/pull/481#discussion_r114158965
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
 ---
@@ -131,30 +131,41 @@ protected void initialize() {
 if (!hasInitialized) {
   /* create index region */
   dataRegion = getDataRegion();
-  // assert dataRegion != null;
-
-  repositoryManager = createRepositoryManager();
-
-  // create AEQ, AEQ listener and specify the listener to 
repositoryManager
-  createAEQ(dataRegion);
-
+  createLuceneListenersAndFileChunkRegions(
+  (AbstractPartitionedRepositoryManager) repositoryManager);
--- End diff --

More casting going on here.


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-05-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991141#comment-15991141
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user upthewaterspout commented on a diff in the pull request:

https://github.com/apache/geode/pull/481#discussion_r114158872
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
 ---
@@ -78,17 +87,9 @@ protected RepositoryManager createRepositoryManager() {
 // create PR fileAndChunkRegion, but not to create its buckets for now
 final String fileRegionName = createFileRegionName();
 PartitionAttributes partitionAttributes = 
dataRegion.getPartitionAttributes();
-
-
-// create PR chunkRegion, but not to create its buckets for now
-
-// we will create RegionDirectories on the fly when data comes in
-HeterogeneousLuceneSerializer mapper = new 
HeterogeneousLuceneSerializer(getFieldNames());
-PartitionedRepositoryManager partitionedRepositoryManager =
-new PartitionedRepositoryManager(this, mapper);
 DM dm = 
this.cache.getInternalDistributedSystem().getDistributionManager();
 LuceneBucketListener lucenePrimaryBucketListener =
-new LuceneBucketListener(partitionedRepositoryManager, dm);
+new LuceneBucketListener((PartitionedRepositoryManager) 
partitionedRepositoryManager, dm);
--- End diff --

Having to cast is a bit of a bad smell here. It seems like either 
LuceneBucketListener should take an AbstractPartitionedRepositoryManager, or 
createLuceneListenersAndFileChunkRegions should have been passed in a 
PartitionRespositoryManager.


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989308#comment-15989308
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

GitHub user nabarunnag opened a pull request:

https://github.com/apache/geode/pull/481

GEODE-2828: AEQ being created before the user region

Potential Reviewers
@gesterzhou @jhuynh1 @upthewaterspout @ladyVader @boglesby 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/nabarunnag/incubator-geode feature/GEODE-2828

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/geode/pull/481.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #481


commit eb3f7e988c518c2009acfd3f49a6f6bab987bfb0
Author: nabarun 
Date:   2017-04-26T01:20:37Z

GEODE-2828: AEQ being created before the user region




> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989283#comment-15989283
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user nabarunnag commented on the issue:

https://github.com/apache/geode/pull/479
  
Sending in a fresh pull request with all modification


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989284#comment-15989284
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user nabarunnag closed the pull request at:

https://github.com/apache/geode/pull/479


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-04-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986147#comment-15986147
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user nabarunnag commented on a diff in the pull request:

https://github.com/apache/geode/pull/479#discussion_r113630780
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneEventListener.java
 ---
@@ -53,6 +54,8 @@
   Logger logger = LogService.getLogger();
 
   private final RepositoryManager repositoryManager;
+  private CountDownLatch isFileAndChunkRegionReady = new CountDownLatch(1);
+  private boolean ready = false;
--- End diff --

Removed the flag and lucene precheckin was success.
Futher testing is ongoing


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-04-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986145#comment-15986145
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user nabarunnag commented on a diff in the pull request:

https://github.com/apache/geode/pull/479#discussion_r113630711
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
 ---
@@ -166,28 +166,28 @@ public void createIndex(final String indexName, 
String regionPath, final Analyze
* 
* Public because this is called by the Xml parsing code
*/
-  public void afterDataRegionCreated(final String indexName, final 
Analyzer analyzer,
-  final String dataRegionPath, final Map 
fieldAnalyzers,
-  final String... fields) {
-LuceneIndexImpl index = createIndexRegions(indexName, dataRegionPath);
-index.setSearchableFields(fields);
-index.setAnalyzer(analyzer);
-index.setFieldAnalyzers(fieldAnalyzers);
+  public void afterDataRegionCreated(LuceneIndexImpl index) {
 index.initialize();
 registerIndex(index);
 if (this.managementListener != null) {
   this.managementListener.afterIndexCreated(index);
 }
+
+  }
+
+  public LuceneIndexImpl beforeDataRegionCreated(final String indexName, 
final String regionPath,
+  RegionAttributes attributes, final Analyzer analyzer,
+  final Map fieldAnalyzers, String aeqId, final 
String... fields) {
+LuceneIndexImpl index = createIndexRegions(indexName, regionPath);
--- End diff --

Changed it to createIndexObject - any better suggestion is welcomed 


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-04-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15985589#comment-15985589
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user jhuynh1 commented on a diff in the pull request:

https://github.com/apache/geode/pull/479#discussion_r113565230
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
 ---
@@ -166,28 +166,28 @@ public void createIndex(final String indexName, 
String regionPath, final Analyze
* 
* Public because this is called by the Xml parsing code
*/
-  public void afterDataRegionCreated(final String indexName, final 
Analyzer analyzer,
-  final String dataRegionPath, final Map 
fieldAnalyzers,
-  final String... fields) {
-LuceneIndexImpl index = createIndexRegions(indexName, dataRegionPath);
-index.setSearchableFields(fields);
-index.setAnalyzer(analyzer);
-index.setFieldAnalyzers(fieldAnalyzers);
+  public void afterDataRegionCreated(LuceneIndexImpl index) {
 index.initialize();
 registerIndex(index);
 if (this.managementListener != null) {
   this.managementListener.afterIndexCreated(index);
 }
+
+  }
+
+  public LuceneIndexImpl beforeDataRegionCreated(final String indexName, 
final String regionPath,
+  RegionAttributes attributes, final Analyzer analyzer,
+  final Map fieldAnalyzers, String aeqId, final 
String... fields) {
+LuceneIndexImpl index = createIndexRegions(indexName, regionPath);
--- End diff --

This wasn't introduced with this diff, but we probably want to rename this 
method.  I don't think the method is creating any index regions.  I think it's 
just creating the index object but none of the file/chunk or aeq region or 
buckets


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (GEODE-2828) AEQ needs to be created before the user region

2017-04-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15985582#comment-15985582
 ] 

ASF GitHub Bot commented on GEODE-2828:
---

Github user upthewaterspout commented on a diff in the pull request:

https://github.com/apache/geode/pull/479#discussion_r113564312
  
--- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneEventListener.java
 ---
@@ -53,6 +54,8 @@
   Logger logger = LogService.getLogger();
 
   private final RepositoryManager repositoryManager;
+  private CountDownLatch isFileAndChunkRegionReady = new CountDownLatch(1);
+  private boolean ready = false;
--- End diff --

Does this need to be a separate flag? Seems like the CoutDownLatch already 
has the flag. If not this should be volatile.


> AEQ needs to be created before the user region
> --
>
> Key: GEODE-2828
> URL: https://issues.apache.org/jira/browse/GEODE-2828
> Project: Geode
>  Issue Type: Bug
>  Components: lucene
>Reporter: nabarun
>
> Issue:
> Events are lost as the region is being created, because the AEQ gets created 
> after the user region is created, and the indexes are not being created via 
> AEQ.
> Solution:
> 1. AEQ being created before the user region.
> 2. Processing of lucene events are being halted by a countdown latch and 
> starts processing after the user region is created.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)