[ https://issues.apache.org/jira/browse/GEODE-4717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
nabarun closed GEODE-4717. -------------------------- > 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)