When the container calls the get_archive method, 100% CPU usage occurs in the new version of v3.3.0
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
Hi, I used to use the container's get_archive method when I used version v2.7.0
log_init = y.get_archive(service_log_path)
log_str = str(log_init[0].data, encoding="utf-8")
Later, when I used v.3.3.0, I found there was no data method, so I tried other methods
log_init = y.get_archive(service_log_path)
log_str = ''
for i in log_init[0]:
log_str = log_str + str(i, encoding="utf-8")
But the consequence of what I did was that if I extracted an 8M text log, python3 would be 100% CPU utilization. And very slowly, I don't know what he did with it. But I won't have this problem with v2.7.0. It's almost always done in 2 seconds.
Contributor guide
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.
Research direction
Start with the container's get_archive method and reproduce the reported behavior using the v2.7.0 and v3.3.0 examples against an 8M text log. Compare CPU usage, completion time, and returned data handling; done means log extraction completes without the reported 100% Python CPU usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100