CDR Tickets

Issue Number 5232
Summary [Internal] Trial Listing loader should delete old elasticsearch indices
Created 2023-04-27 11:14:16
Issue Type Improvement
Submitted By Learn, Blair (NIH/NCI) [C]
Assigned To Kline, Bob (NIH/NCI) [C]
Status Closed
Resolved 2023-05-26 12:03:42
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.344574
Description

After a successful run, the loader should delete any indices (both listing info and trial type) which are more than five days old. Except, the last three successfully loaded indices of both types must be retained.

So, if it's been seven days since the last successful load, the last three successfully loaded indices are retained even though they're more than five days old. Additionally, if whatever is preventing the loader from running is fixed on day eight, only the oldest of those last three indices is deleted.

Comment entered 2023-05-26 12:03:42 by Kline, Bob (NIH/NCI) [C]

Installed and tested on DEV. Here's the list of indices before the run with the software change for this ticket:

.geoip_databases
autosg
bestbets_live_v1_20230310_142328
bestbets_live_v1_20230310_150116
bestbets_preview_v1_20230310_150130
bestbets_test
bestbets_v1_20230210_111431
bestbets_v1_20230210_112209
drugv1-20230520223500
drugv1-20230521223500
drugv1-20230522223500
drugv1-20230523223500
drugv1-20230524223500
drugv1-20230525223500
glossaryv1-20230520223000
glossaryv1-20230521223000
glossaryv1-20230522223000
glossaryv1-20230523223000
glossaryv1-20230524223000
glossaryv1-20230525223000
listinginfov1-20230401231656
listinginfov1-20230402231645
listinginfov1-20230403231642
listinginfov1-20230404231647
listinginfov1-20230405231650
listinginfov1-20230406231645
listinginfov1-20230407231652
listinginfov1-20230408231650
listinginfov1-20230409231642
listinginfov1-20230410231649
listinginfov1-20230411231655
listinginfov1-20230412231636
listinginfov1-20230413231640
listinginfov1-20230414231646
listinginfov1-20230415231648
listinginfov1-20230416231641
listinginfov1-20230417231640
listinginfov1-20230418231635
listinginfov1-20230419231643
listinginfov1-20230420231646
listinginfov1-20230421231656
listinginfov1-20230422231646
listinginfov1-20230423231646
listinginfov1-20230424231653
listinginfov1-20230427231641
listinginfov1-20230428231646
listinginfov1-20230429231648
listinginfov1-20230430231649
listinginfov1-20230501231652
listinginfov1-20230502231649
listinginfov1-20230503231647
listinginfov1-20230504231656
listinginfov1-20230505231646
listinginfov1-20230506231650
listinginfov1-20230507231647
listinginfov1-20230508231646
listinginfov1-20230509231643
listinginfov1-20230510231640
listinginfov1-20230511231643
listinginfov1-20230512231656
listinginfov1-20230513231700
listinginfov1-20230514231649
listinginfov1-20230515231651
listinginfov1-20230516231646
listinginfov1-20230517231652
listinginfov1-20230518231656
listinginfov1-20230519231646
listinginfov1-20230520231644
listinginfov1-20230521231639
listinginfov1-20230522231647
listinginfov1-20230523231647
listinginfov1-20230524231649
listinginfov1-20230525231650
listinginfov1-20230526112225
listinginfov1-20230526113735
r4r_v1_20221108_172028
r4r_v1_20221118_134950
r4r_v1_20221118_151522
sitewide_2022
sitewide_2023
test1
test2
testsitewide
trialtypeinfov1-20230401231656
trialtypeinfov1-20230402231645
trialtypeinfov1-20230403231642
trialtypeinfov1-20230404231647
trialtypeinfov1-20230405231650
trialtypeinfov1-20230406231645
trialtypeinfov1-20230407231652
trialtypeinfov1-20230408231650
trialtypeinfov1-20230409231642
trialtypeinfov1-20230410231649
trialtypeinfov1-20230411231655
trialtypeinfov1-20230412231636
trialtypeinfov1-20230413231640
trialtypeinfov1-20230414231646
trialtypeinfov1-20230415231648
trialtypeinfov1-20230416231641
trialtypeinfov1-20230417231640
trialtypeinfov1-20230418231635
trialtypeinfov1-20230419231643
trialtypeinfov1-20230420231646
trialtypeinfov1-20230421231656
trialtypeinfov1-20230422231646
trialtypeinfov1-20230423231646
trialtypeinfov1-20230424231653
trialtypeinfov1-20230427231641
trialtypeinfov1-20230428231646
trialtypeinfov1-20230429231648
trialtypeinfov1-20230430231649
trialtypeinfov1-20230501231652
trialtypeinfov1-20230502231649
trialtypeinfov1-20230503231647
trialtypeinfov1-20230504231656
trialtypeinfov1-20230505231646
trialtypeinfov1-20230506231650
trialtypeinfov1-20230507231647
trialtypeinfov1-20230508231646
trialtypeinfov1-20230509231643
trialtypeinfov1-20230510231640
trialtypeinfov1-20230511231643
trialtypeinfov1-20230512231656
trialtypeinfov1-20230513231700
trialtypeinfov1-20230514231649
trialtypeinfov1-20230515231651
trialtypeinfov1-20230516231646
trialtypeinfov1-20230517231652
trialtypeinfov1-20230518231656
trialtypeinfov1-20230519231646
trialtypeinfov1-20230520231644
trialtypeinfov1-20230521231639
trialtypeinfov1-20230522231647
trialtypeinfov1-20230523231647
trialtypeinfov1-20230524231649
trialtypeinfov1-20230525231650
trialtypeinfov1-20230526112225
trialtypeinfov1-20230526113735

... and here's the list of indices after that run:

.geoip_databases
autosg
bestbets_live_v1_20230310_142328
bestbets_live_v1_20230310_150116
bestbets_preview_v1_20230310_150130
bestbets_test
bestbets_v1_20230210_111431
bestbets_v1_20230210_112209
drugv1-20230520223500
drugv1-20230521223500
drugv1-20230522223500
drugv1-20230523223500
drugv1-20230524223500
drugv1-20230525223500
glossaryv1-20230520223000
glossaryv1-20230521223000
glossaryv1-20230522223000
glossaryv1-20230523223000
glossaryv1-20230524223000
glossaryv1-20230525223000
listinginfov1-20230521231639
listinginfov1-20230522231647
listinginfov1-20230523231647
listinginfov1-20230524231649
listinginfov1-20230525231650
listinginfov1-20230526112225
listinginfov1-20230526113735
listinginfov1-20230526115012
r4r_v1_20221108_172028
r4r_v1_20221118_134950
r4r_v1_20221118_151522
sitewide_2022
sitewide_2023
test1
test2
testsitewide
trialtypeinfov1-20230521231639
trialtypeinfov1-20230522231647
trialtypeinfov1-20230523231647
trialtypeinfov1-20230524231649
trialtypeinfov1-20230525231650
trialtypeinfov1-20230526112225
trialtypeinfov1-20230526113735
trialtypeinfov1-20230526115012

I'll let move the ticket to theĀ DEV Verified state after he's had a chance to check things over onĀ ncias-d2433-v.

Comment entered 2023-05-26 12:05:19 by Kline, Bob (NIH/NCI) [C]
Comment entered 2023-05-26 12:11:11 by Kline, Bob (NIH/NCI) [C]

ES has 94 fewer indices after the run with the cleanup code than before.

Elapsed: 0:00:00.002054