Repository: oodt Updated Branches: refs/heads/release-1.2.2 [created] b2064c410
fix merge Project: http://git-wip-us.apache.org/repos/asf/oodt/repo Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/2937ac65 Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/2937ac65 Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/2937ac65 Branch: refs/heads/release-1.2.2 Commit: 2937ac65253f31ce00c880ea59656cf4c72e4d1d Parents: 23b545a Author: Tom Barber <[email protected]> Authored: Wed Jan 3 15:25:01 2018 +0000 Committer: Tom Barber <[email protected]> Committed: Mon Feb 5 19:23:07 2018 +0000 ---------------------------------------------------------------------- CHANGES.txt | 12 ++++++++++ .../oodt/cas/filemgr/catalog/LuceneCatalog.java | 24 ++++++++++---------- 2 files changed, 24 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oodt/blob/2937ac65/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 471155c..ec32def 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,9 +1,21 @@ Apache OODT Change Log ====================== +Release 1.2.2 - 02/05/2018 + +* OODT-968 Add metadata removes product + + Release 1.2.1 - 11/10/2017 * OODT-967 Solr version for 1.2.1 breaks SolrDumper in File Manager (mattmann) +Release 1.3 - In Progress + +* OODT-964, OODT-963 Fix issues merging Distributed ZK Config module into Avro-RPC branch (imesha,mattmann) +* OODT-957 Add CVE reporting plugin to maven build chain +* OODT-958 Update commons-collections +* OODT-959 Update tika to 1.16 + Release 1.2 - 08/14/2017 * OODT-955 Fix numhits error in Lucene Catalog (magicaltrout) http://git-wip-us.apache.org/repos/asf/oodt/blob/2937ac65/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java ---------------------------------------------------------------------- diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java index 59ded25..e87a436 100644 --- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java +++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java @@ -150,26 +150,26 @@ public class LuceneCatalog implements Catalog { */ public synchronized void addMetadata(Metadata m, Product product) throws CatalogException { + CompleteProduct p if(product.getProductId()!=null && CATALOG_CACHE.containsKey(product.getProductId())) { - CompleteProduct p = CATALOG_CACHE.get(product.getProductId()); - - p.setMetadata(m); - if (hasMetadataAndRefs(p)) { - LOG.log(Level.FINE, - "metadata and references present for product: [" - + product.getProductId() + "]"); - addCompleteProductToIndex(p); - // now remove its entry from the cache - CATALOG_CACHE.remove(product.getProductId()); - } + p = CATALOG_CACHE.get(product.getProductId()); } else{ // move product from index to cache // it will be moved back after metadata is added - getCompleteProductById(product.getProductId(), true, true); + p = getCompleteProductById(product.getProductId(), true, true); LOG.log(Level.FINE, "Product not found in local cache, retrieved from index"); removeProduct(product); + } + p.setMetadata(m); + if (hasMetadataAndRefs(p)) { + LOG.log(Level.FINE, + "metadata and references present for product: [" + + product.getProductId() + "]"); + addCompleteProductToIndex(p); + // now remove its entry from the cache + CATALOG_CACHE.remove(product.getProductId()); } }
