Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite cache creation during raw image series loading #2910

Open
ytoaa opened this issue Apr 23, 2024 · 6 comments
Open

Infinite cache creation during raw image series loading #2910

ytoaa opened this issue Apr 23, 2024 · 6 comments
Labels
needs-triage Needs to be triaged by a developer and assigned a release

Comments

@ytoaa
Copy link

ytoaa commented Apr 23, 2024

What happened?

This happened in version 0.8.1, no problem in 0.8.0.
After selecting a chapter with approximately over 100 images, I was able to see that it was infinitely created in the cache folder when it was loading.

What did you expect?

I've seen that the storage is giving out rapidly

Kavita Version Number - If you don not see your version number listed, please update Kavita and see if your issue still persists.

0.8.1 - Stable

What operating system is Kavita being hosted from?

Docker (Other)

If the issue is being seen on Desktop, what OS are you running where you see the issue?

Windows

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Chrome, Microsoft Edge

If the issue is being seen on Mobile, what OS are you running where you see the issue?

None

If the issue is being seen on the Mobile UI, what browsers are you seeing the problem on?

No response

Relevant log output

No response

Additional Notes

No response

@ytoaa ytoaa added the needs-triage Needs to be triaged by a developer and assigned a release label Apr 23, 2024
@majora2007
Copy link
Member

Can you break this down into steps to reproduce like:

  1. Open chapter in Kavita
    Expected: See 100 files in cache
    Actual: ...

@ytoaa
Copy link
Author

ytoaa commented Apr 24, 2024

Can you break this down into steps to reproduce like:

  1. Open chapter in Kavita
    Expected: See 100 files in cache
    Actual: ...

Okay. First, the root folder is /t, and there is ./test/Vol2 Ch. 16614321/(image files) in it.
There are 100 images in that chapter, and when you press the chapter, the status of the cache folder is as follows.
스크린샷 2024-04-24 142828
스크린샷 2024-04-24 142512
Then, raise the version to 0.8.1, force a scan of the library with the image, and press the chapter again.
스크린샷 2024-04-24 142512
In the cache folder, folders with a myriad of the same files are created.
스크린샷 2024-04-24 142637

For your information, there is only one chapter above in that series.

If you create a series with a lot of images in the default state without having to follow the above method, the same problem arises.

Next is the "trace" log
_kavita-kavita-1_logs (4).txt


A few more tests show that you create as many cache folders as images, and then you put the images in the cache folder to create 100*100 = 10000 images

@majora2007 majora2007 added this to To do in v0.8 - PDF & Comic Love via automation Apr 24, 2024
@majora2007
Copy link
Member

Okay from the Kavita image, it does look like Kavita is functioning correctly. if you see, chapter X has 100 duplicates (likely a bad parsing), so when you open to read, it's moving all those internal files out.

I'll try to reproduce with your file layout you've given. It might be beneficial for me to build you a dedicated build and have you test it out, since you're a heavy Image library user.

@ytoaa
Copy link
Author

ytoaa commented Apr 25, 2024

Okay from the Kavita image, it does look like Kavita is functioning correctly. if you see, chapter X has 100 duplicates (likely a bad parsing), so when you open to read, it's moving all those internal files out.

I'll try to reproduce with your file layout you've given. It might be beneficial for me to build you a dedicated build and have you test it out, since you're a heavy Image library user.

For now, I will stay in version 0.8.0 until the issue is fixed.
Thank you so much for your care.

@ytoaa
Copy link
Author

ytoaa commented Apr 27, 2024

image
#2874
CacheService.cs
After replacing the file with version 0.8.0 and building it
We have confirmed that the problem has disappeared.
It's related to #2770

@ytoaa
Copy link
Author

ytoaa commented Apr 28, 2024

"if (files.Count > 0 && files[0].Format == MangaFormat.Image)"

In
"_readingItemService.Extract(file.FilePath, Path.Join(extractPath, extraPath), MangaFormat.Image, files.Count);"

The code
"_readingItemService.Extract(file.FilePath, Path.Join(extractPath, extraPath), MangaFormat.Image);"

I adjusted it to this. If you do this
The cache problem and
#2770
I was able to solve at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Needs to be triaged by a developer and assigned a release
Projects
Development

No branches or pull requests

2 participants