LMT should provide a utility to clear old raw data
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by comparing the existing lmtsh "clr" command with lmt_agg.cron and the proposed MySQL cleanup query, including how /etc/lmt/rwpasswd is used. Decide which entry point should own age-based deletion and define options for selecting tables and a cutoff date; done means the chosen utility can be run manually or as a cron job with documentation.
Written by the indexing model from the issue text.
Description
It would be useful if LMT had a script, an option to lmtsh, or an option to lmt_agg.cron that would clear raw data which is older than a certain date. Perhaps this could be in the form of a shell script that can be run manually or set up to run as a cron job.
I was thinking a shell script that executes a bunch of MySQL commands like this one would do the trick:
mysql -p$(cat /etc/lmt/rwpasswd) -e "DELETE MDS_OPS_DATA
FROM MDS_OPS_DATA INNER JOIN TIMESTAMP_INFO
ON MDS_OPS_DATA.TS_ID=TIMESTAMP_INFO.TS_ID
WHERE TIMESTAMP < '$TIMESTAMP';"
Of course the actual shell script would need options for which data tables to clear and the time frame to clear. @morrone please advise whether this is a reasonable addition to LMT. If so, I will create this script and its documentation and issue a pull request.
Other options considered:
- Add this functionality to lmt_agg.cron. This might be misleading because this script is for aggregation, not clearing. On the plus side, it could make sure that data which has not been aggregated yet is not deleted. It probably doesn't need to be implemented in Perl though.
- Add this functionality to lmtsh. This would have to be done manually and not as a cron job. However, there is already some clearing functionality here with the "clr" command.
- Dominant language
- C
- Stars
- 78
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from llnl/lmt
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
fix single key commands consistency and documentationMay be free again @defaziogiancarlo claimed this 1678 days ago, and no pull request is open. Open
-
remove legacy codeMay be free again @defaziogiancarlo claimed this 1678 days ago, and no pull request is open. Open
Similar issues
-
要トリアージ 辞書
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
yksr-melt/Meltype#1625 · 1 reaction ·
Maintainers usually reply within 1 day
-
kind/bug priority/medium qa_automation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
yugabyte/yugabyte-db#37324 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
tree-sitter/tree-sitter#6111 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meshcore-dev/MeshCore#3781 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
ly05010419/MacNativeGames#1897 ·
Maintainers usually reply within 1 day