File tree Expand file tree Collapse file tree
int-test/cmr/indexer/test
system-int-test/src/cmr/system_int_test/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 375375 " Given an empty index set this is the expected created index-set. This is used for the update-index-sets-test."
376376 {:index-set {:name " test-index-set" ,
377377 :id 3 ,
378- ; ; usually we would have a revision-id in the expected index-set return,
379- ; but because this value keeps changing we are going to leave it out here for test comparisons where this var is used
380- ; :revision-id 1
378+ ; ; Usually we would have a revision-id in the expected index-set return,
379+ ; ; but because this value keeps changing we are going to omit it here for test comparisons where this var is used.
380+ ; ; Commented out so future devs know this is a field that is being intentionally ignored
381+ ; ; :revision-id 1
381382 :deleted false
382383 :concepts {
383384 :generic-order-option {},
Original file line number Diff line number Diff line change 170170 ; ; reset operation available just for development purposes
171171 ; ; delete configured elastic indexes and create them back
172172 (POST " /reset" {:keys [request-context]}
173- (println " INSIDE indexer's reset" )
174173 (acl/verify-ingest-management-permission request-context :update )
175174 (cache/reset-caches request-context)
176175 (index-svc/reset request-context)
Original file line number Diff line number Diff line change 237237(defn update-indexes
238238 " Updates the indexes to make sure they have the latest mappings"
239239 [context params]
240- (let [; ; setup for non-gran cluster
240+ (let [; ; setup non-gran cluster index set
241241 [existing-non-gran-index-set expected-non-gran-index-set] (compute-expected-index-set context es-config/elastic-name)
242- ; ; setup for gran cluster
242+ ; ; setup gran cluster index set
243243 [existing-gran-index-set expected-gran-index-set] (compute-expected-index-set context es-config/gran-elastic-name)
244244
245245 non-gran-update? (or (= " true" (:force params))
Original file line number Diff line number Diff line change 355355(defn put-index-set
356356 " Upsert the given index-set to the index-sets index in ES."
357357 [context combined-index-set]
358- (let [; ; Strip out revision-id and deleted if they were provided in the request body
359- ; ; to avoid 422 errors from metadata-db.
358+ (let [; ; Strip out revision-id and deleted if they were provided in the request body to avoid 422 errors from metadata-db.
360359 clean-combined-index-set (update combined-index-set :index-set dissoc :revision-id :deleted )
361360 split-index-set-map (split-index-set-by-cluster clean-combined-index-set)
362361 ; ; Save a single unified version to Oracle first to get the revision-id
660659 (update-index-set context es-config/gran-elastic-name (util/remove-nils-empty-maps-seqs new-gran-index-set) revision-id))
661660
662661 ; ; Delete the separate index for this collection when moving back into small collections index
663-
664662 (when (= " small-collections" target)
665663 (let [collection-key (keyword concept-id)
666664 old-separate-index (get-in old-gran-index-set [:index-set :concepts :granule collection-key])]
Original file line number Diff line number Diff line change 256256 {:headers {transmit-config/token-header (transmit-config/echo-system-token )}
257257 :connection-manager (s/conn-mgr )
258258 :throw-exceptions false }))
259-
260- (defn index-set-reset
261- []
262- (client/post (url/index-set-reset-url )
263- {:headers {transmit-config/token-header (transmit-config/echo-system-token )}
264- :connection-manager (s/conn-mgr )
265- :throw-exceptions false }))
You can’t perform that action at this time.
0 commit comments