Conversation
85aa1c0 to
87bfa45
Compare
Codecov Report
@@ Coverage Diff @@
## master #998 +/- ##
==========================================
- Coverage 53.91% 53.88% -0.04%
==========================================
Files 116 114 -2
Lines 11000 11011 +11
==========================================
+ Hits 5931 5933 +2
- Misses 4391 4401 +10
+ Partials 678 677 -1
Continue to review full report at Codecov.
|
|
Should we run the tests with -race? maps aren't thread safe and I'm not 100% sure we cannot have multiple file listings in progress. aka, callbacks coming in from fuse. Side note, this should be abstracted out, no? We now have multiple backends and cmd's where we are adding some form of caching to make things perform. Seems to me we should do this more central. For exmaple, I can imagine this commit not doing much on S3, as it already has a size cache... |
|
Good points, but both aren't relevant here:
I have plans for reworking the index data structures (also to address #979), maybe we can drop this particular cache then. |
|
I've wrapped the cache in a struct and added a |
Wrap it in a struct and add a Lookup() function to make clear that it is only queried, not changed, so we don't have any race conditions.
Codecov Report
@@ Coverage Diff @@
## master #998 +/- ##
==========================================
- Coverage 53.91% 53.86% -0.06%
==========================================
Files 116 116
Lines 11000 11019 +19
==========================================
+ Hits 5931 5935 +4
- Misses 4391 4406 +15
Partials 678 678
Continue to review full report at Codecov.
|
Closes: #820