You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "nabarun (JIRA)" <ji...@apache.org> on 2018/02/22 01:08:00 UTC

[jira] [Updated] (GEODE-4717) IndexRepositoryFactory refactor the computeRepository method

     [ https://issues.apache.org/jira/browse/GEODE-4717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

nabarun updated GEODE-4717:
---------------------------
    Issue Type: Sub-task  (was: Bug)
        Parent: GEODE-3924

> IndexRepositoryFactory refactor the computeRepository method
> ------------------------------------------------------------
>
>                 Key: GEODE-4717
>                 URL: https://issues.apache.org/jira/browse/GEODE-4717
>             Project: Geode
>          Issue Type: Sub-task
>          Components: lucene
>            Reporter: nabarun
>            Priority: Major
>
> In computeRepository method call refactor the below code into an extracted new method
> Set<IndexRepository> affectedRepos = new HashSet<IndexRepository>();
> {code:java}
> Iterator keysIterator = dataBucket.keySet().iterator();
> while (keysIterator.hasNext()) {
>  Object key = keysIterator.next();
>  Object value = getValue(userRegion.getEntry(key));
>  if (value != null) {
>  repo.update(key, value);
>  } else {
>  repo.delete(key);
>  }
>  affectedRepos.add(repo);
> }
> for (IndexRepository affectedRepo : affectedRepos) {
>  affectedRepo.commit();
> }
> // fileRegion ops (get/put) need bucketId as a callbackArg for PartitionResolver
> fileRegion.put(APACHE_GEODE_INDEX_COMPLETE, APACHE_GEODE_INDEX_COMPLETE, bucketId);
> success = true;{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)