Skip to content

Commit

Permalink
CMR-10026: Reduce metadata-db logs (#2160)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaeng72 authored Aug 7, 2024
1 parent cdd8571 commit 73aff73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions metadata-db-app/src/cmr/metadata_db/data/oracle/search.clj
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
(do
(info "Couldn't find batch so searching for more from" start-index)
(when-let [next-id (find-batch-starting-id db table params start-index)]
(info "Found next-id of" next-id)
(debug "Found next-id of" next-id)
(lazy-find next-id)))
;; We found a batch. Return it and the next batch lazily
(cons batch (lazy-seq (lazy-find (+ start-index batch-size)))))))]
Expand Down Expand Up @@ -311,7 +311,7 @@
(do
(info "Couldn't find batch so searching for more from" start-index)
(when-let [next-id (find-batch-starting-id-with-stmt db stmt start-index)]
(info "Found next-id of" next-id)
(debug "Found next-id of" next-id)
(lazy-find next-id)))
;; We found a batch. Return it and the next batch lazily
(cons batch (lazy-seq (lazy-find (+ start-index batch-size)))))))]
Expand Down
10 changes: 5 additions & 5 deletions metadata-db-app/src/cmr/metadata_db/services/concept_service.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[cmr.common.concepts :as cu]
[cmr.common.config :as cfg :refer [defconfig]]
[cmr.common.date-time-parser :as p]
[cmr.common.log :refer (info warn trace)]
[cmr.common.log :refer (debug info warn trace)]
[cmr.common.mime-types :as mt]
[cmr.common.services.errors :as errors]
[cmr.common.services.messages :as cmsg]
Expand Down Expand Up @@ -528,7 +528,7 @@
(defn get-concepts
"Get multiple concepts by concept-id and revision-id. Returns concepts in order requested"
[context concept-id-revision-id-tuples allow-missing?]
(info (format "Getting [%d] concepts by concept-id/revision-id"
(debug (format "Getting [%d] concepts by concept-id/revision-id"
(count concept-id-revision-id-tuples)))
(let [start (System/currentTimeMillis)
parallel-chunk-size (get-in context [:system :parallel-chunk-size])
Expand Down Expand Up @@ -1060,7 +1060,7 @@
(c/get-expired-concepts db provider concept-type)))]
(loop []
(when-let [expired-concepts (seq (get-expired))]
(info "Deleting expired" (name concept-type) "concepts:" (pr-str (map :concept-id expired-concepts)))
(debug "Deleting expired" (name concept-type) "concepts:" (pr-str (map :concept-id expired-concepts)))
(doseq [c expired-concepts]
(let [tombstone (-> c
(update-in [:revision-id] inc)
Expand Down Expand Up @@ -1124,7 +1124,7 @@
;; We only want to publish the deleted-tombstone event in the case where a granule tombstone is
;; being cleaned up, not when an old revision is being removed, because the case of old revision,
;; a deleted-tombstone even would have been published already.
(info "Starting deletion of old" concept-type-name "for provider" (:provider-id provider))
(debug "Starting deletion of old" concept-type-name "for provider" (:provider-id provider))
(force-delete-with
context provider concept-type false
#(c/get-old-concept-revisions
Expand All @@ -1136,7 +1136,7 @@
concept-truncation-batch-size)
concept-truncation-batch-size)

(info "Starting deletion of tombstoned" concept-type-name "for provider" (:provider-id provider))
(debug "Starting deletion of tombstoned" concept-type-name "for provider" (:provider-id provider))
(force-delete-with
context provider concept-type true
#(c/get-tombstoned-concept-revisions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns cmr.metadata-db.services.provider-service
(:require
[cmr.common.log :refer (info)]
[cmr.common.log :refer (debug info)]
[cmr.common.services.errors :as errors]
[cmr.common.services.messages :as cmsg]
[cmr.common.util :as util]
Expand All @@ -27,7 +27,7 @@
Returns a clojure.lang.APersistentMap$ValSeq; list of maps"
([context] (get-providers context nil))
([context params]
(info "Getting provider list.")
(debug "Getting provider list.")
(let [db (mdb-util/context->db context)
providers (providers/get-providers db)
providers (if (:meta params)
Expand Down

0 comments on commit 73aff73

Please sign in to comment.