nabarun created GEODE-4717: ------------------------------ Summary: IndexRepositoryFactory refactor the computeRepository method Key: GEODE-4717 URL: https://issues.apache.org/jira/browse/GEODE-4717 Project: Geode Issue Type: Bug Components: lucene Reporter: nabarun
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)