amplitude / Amplitude-Kotlin

Amplitude Kotlin SDK
MIT License
28 stars 11 forks source link

fix: catch filenotfound exception when rollover before upload #103

Closed liuyang1520 closed 1 year ago

liuyang1520 commented 1 year ago

Summary

Issue: https://github.com/amplitude/Amplitude-Kotlin/issues/71

It seems that this issue happens when another thread (coroutine) processes the file and delete it before this one, then it tries to get the file. This issue should rarely happen, and is not easy to reproduce. readEventsContent will list all available files then open one by one with another catch of FileNotFoundException, so we can safely let it execute.

Checklist

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.6.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: