Comments (5)
@wenhaocs good catch. Do you mind sending a PR to address that and I can merge it.
from cachelib.
@sathyaphoenix Please let me know if you want to throw error explicitly and tell users the limit for #cacheEntries, or just implicitly set the bucketPower to be maximum like in the PR.
from cachelib.
@wenhaocs Shall we use std::min instead of std::max to pick the smaller value?
from cachelib.
To be consistent with the constructor, it makes sense to throw an error when the value is going to be incorrect rather than silently fix it. Most likely in this case the user gave a wrong input and it is better to abort rather than silently run with a misconfigured hash table. Also, like @jiayuebao pointed out, we should be doing a std::min instead of max if we were to adjust to a meaningful value.
@wenhaocs can you add a simple unit test for this ? we can introduce a new .cpp here to add CacheAllocatorConfig unit tests. @jiayuebao please let us know if there is a better place to add the test.
from cachelib.
For unit test, we already have one here. And we can add more cases there.
from cachelib.
Related Issues (20)
- Fail to persist nvm cache due to "exceeding metadata limit" HOT 1
- Build failure - cannot find python-six HOT 2
- build.sh: error: failed to build cachelib HOT 2
- build.sh: error: No build recipe for detected operating system 'fedora38' HOT 3
- New runtime error HOT 5
- cachelib fails to build HOT 3
- allocator-test-AllocationClassTest Failed On ARM
- Where is `cachelib/facebook/admin/CacheAdmin.h`? HOT 1
- cachelib fails to build HOT 3
- refCount alignment issue HOT 4
- The method config.enableChainedItems() cannot be found. HOT 1
- Some questions in resizing the cachelib pool size HOT 2
- Is there any plan to provide an Java SDK for this cachelib ? HOT 2
- Fail to build dependency fbthrift (with errors reported in fmt) HOT 4
- make clean option for contrib/build.sh HOT 1
- build error about fizz on ubuntu22.04 HOT 2
- CDN trace expected behavior HOT 2
- Enable FDP for CacheBench HOT 12
- qDepth Support for NVM Cache HOT 6
- Questions about trace files when running cachebench HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cachelib.