Closed LykxSassinator closed 1 year ago
Base: 97.74% // Head: 97.73% // Decreases project coverage by -0.01%
:warning:
Coverage data is based on head (
459c127
) compared to base (3353011
). Patch coverage: 97.88% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@tabokie PTAL, thx
@tabokie PTAL, thx
@tabokie PTAL, thx.
To improve, I think you can just keep thing even simpler, make
FileCollection
as simple as possible (as simple as a Vec):
Thx for your advices. I've also take this design in previous draft, but I dropped it finally. For the reason why I didn't adopt the structure as u said, just like:
struct FileCollection {
stale_files: FileList<F>,
active_files: FileList<F>,
...
}
is that:
In previous work, SinglePipe
is the operator and manager of FileCollection
. IMO, the Stale files and Active files, represent by StaleFileCollection
and ActiveFileCollection
respectively, are the minimal operating unit of FileList
. So, each one of them should be designed as an individual object because the related operations has been encapsulated in the API of SinglePipe
. So, from my views, SinglePipe
is just the subject with same trait as the new FileCollection
u mentioned above. For example, SinglePipe.get_fd(...)
just called the ActiveFileCollection.get_fd(...)
to return the expected fd
to callers.
And the confusing parts, such as prepare_dummy_logs_for_recycle
, will be polished.
@LykxSassinator It doesn't contradict with that I said.
Then all the complicated logic can be put in-place, or wrapped into a bigger struct:
The code snippet I wrote refers to the way to "wrapped into a bigger struct". It can be done as "put in-place" as well.
@LykxSassinator It doesn't contradict with that I said.
Then all the complicated logic can be put in-place, or wrapped into a bigger struct:
The code snippet I wrote refers to the way to "wrapped into a bigger struct". It can be done as "put in-place" as well.
Yes, i got what u meaned. I will polish the current codes.
ping @tabokie PTAL, thx
Ping @tabokie
Ping @tabokie
Ping @tabokie ,thx
Wait for final review after #285 is merged.
Wait for final review after #285 is merged.
Ignore, related updates of the dependency on rust version have been updated in this pr.
@tabokie ping.
ping @tabokie PTAL, thx.
I took the liberty of cleaning up the abstraction myself, it grows to be, somewhat superfluous IMO.
And by the way, #278 (comment) is not addressed. When you use
&mut self
, there's no need to lock again, because mutable reference guarantees exclusive access.
Thx for your suggestions. I'll take some time to comprehend the newly introduced refactoring works.
ping @tabokie PTAL, thx.
ping @tabokie, thx.
Discription
This commit optimize the startup of Engine when
enable-log-recycle
== true, by preparing a bunch of logs named with special suffix ".fakelog", so-called "Fake logs", to curtail the side effect when there is no enough stale files for log recycling.Related Issue: close #277
Signed-off-by: Lucasliang nkcs_lykx@hotmail.com