Skip to content

Tags: facebook/mcrouter

Tags

v2025.12.15.00

Toggle v2025.12.15.00's commit message
Drop constexpr for Hasher using non-constexpr function

Summary:
`folly::hash::SpookyHashV2::Hash64` is non-constexpr function but the Hasher functions are declared with constexpr. This could fail oss build for some build setup, e.g. D88856137 has to patch to avoid build failure on oss UcacheBench.

On mcrouter oss builds, it gives [warnings](https://github.com/facebook/mcrouter/actions/runs/20116015984/job/57725566440#step:4:718)
```
config/ConfigPreprocessor.cpp: In member function ‘constexpr size_t facebook::memcache::{anonymous}::Hasher::operator()(folly::StringPiece) const’:
config/ConfigPreprocessor.cpp:168:42: warning: call to non-‘constexpr’ function ‘static uint64_t folly::hash::SpookyHashV2::Hash64(const void*, size_t, uint64_t)’ [-Winvalid-constexpr]
  168 |         folly::hash::SpookyHashV2::Hash64(sp.begin(), sp.size(), kSeed));
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/runner/work/mcrouter/mcrouter/mcrouter-install/install/include/folly/Range.h:41,
                 from /home/runner/work/mcrouter/mcrouter/mcrouter-install/install/include/folly/container/F14Map.h:33,
                 from config/ConfigPreprocessor.h:15,
                 from config/ConfigPreprocessor.cpp:8:
/home/runner/work/mcrouter/mcrouter/mcrouter-install/install/include/folly/hash/SpookyHashV2.h:76:21: note: ‘static uint64_t folly::hash::SpookyHashV2::Hash64(const void*, size_t, uint64_t)’ declared here
   76 |     static uint64_t Hash64(
      |                     ^~~~~~
```
```
../mcrouter/routes/OriginalClientHashRoute.h: In member function ‘constexpr size_t facebook::memcache::mcrouter::StableHasher::operator()(folly::StringPiece) const’:
../mcrouter/routes/OriginalClientHashRoute.h:35:42: warning: call to non-‘constexpr’ function ‘static uint64_t folly::hash::SpookyHashV2::Hash64(const void*, size_t, uint64_t)’ [-Winvalid-constexpr]
   35 |         folly::hash::SpookyHashV2::Hash64(sp.begin(), sp.size(), kSeed));
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/runner/work/mcrouter/mcrouter/mcrouter-install/install/include/folly/Range.h:41,
                 from routes/McRouteHandleProvider.h:16,
                 from routes/McRouteHandleProvider.cpp:8:
/home/runner/work/mcrouter/mcrouter/mcrouter-install/install/include/folly/hash/SpookyHashV2.h:76:21: note: ‘static uint64_t folly::hash::SpookyHashV2::Hash64(const void*, size_t, uint64_t)’ declared here
   76 |     static uint64_t Hash64(
      |                     ^~~~~~
```

Reviewed By: IvanTopolcic

Differential Revision: D88990847

fbshipit-source-id: 4a9ccabd884de18ab089fdc1819c24e171688dd7

v2025.12.01.00

Toggle v2025.12.01.00's commit message
use folly::hardware_concurrency instead of std::thread::hardware_conc…

…urrency

Summary:
This change replaces calls of std::thread::hardware_concurrency with
folly::hardware_concurrency when the caller wants the number of
processors available to a job.

This should be largely a no-change since most jobs use platform010
with glibc 2.34 where these functions behave identically.  However,
jobs on Aarch64 use glibc 2.40.  There, the folly method continues to
return the number of processors available to a job but the std version
returns the number of processors known to the operating system, a
different number when the job is stacked.

Most of fbcode expects the folly behavior and this codemod only
affects those callers.  By making the switch to the folly method, code
will behave the same when code is run on Aarch64 or when the glibc is
upgraded on x86.

Reviewed By: yfeldblum

Differential Revision: D87911300

fbshipit-source-id: 92f68edc736fe1f10940e115a750f72e09a4a60c

v2025.11.24.00

Toggle v2025.11.24.00's commit message
add tao_status_from_refill flag when using refill_on_miss

Summary: When we use `refill_on_miss` and `refill_from_tier`, TAO operations won't have the correct status flag on refill because the option `tao_status_from_refill` is not set.  This causes the higher level Lookaside TAO to also send to upstream.

Reviewed By: stuclar

Differential Revision: D86919524

fbshipit-source-id: 38dc82a1f21ac31c5a62dcbf5b32cdd9cd2b6e68

v2025.11.17.00

Toggle v2025.11.17.00's commit message
Revert D86649390: Fix CQS signal readability-named-parameter in fbcod…

…e/nodeapi/lib

Differential Revision:
D86649390

Original commit changeset: ba73ed0555ed

Original Phabricator Diff: D86649390

fbshipit-source-id: 255e7a1dbbe4bd8f2186072afe1f2affbdc566e1

v2025.11.10.00

Toggle v2025.11.10.00's commit message
Move Mcrouter init from cc to mcrouter

Summary:
Redesign Luna<>Mcrouter migration.

As discussed in this doc , we want to have individual luna settings for each flavor and move mcrouter initialization from cc to inside mcrouter
[RFC | Use Luna settings For Mcrouter Config Management](https://l.facebook.com/l.php?u=https%3A%2F%2Fdocs.google.com%2Fdocument%2Fd%2F1d8XeW_9C5Le26Bs2gsHDH5JSzFKIbyCquxmXtQKRM3s%2Fedit%3Ftab%3Dt.0%23heading%3Dh.4d44m4ny7dxt&h=AT0p_c4MB5cAEWeI7n2ZHoi3kMIohRkTJI7pZJfVPyJOrM9k29XC39neyzZ-IoQcDO4GebtftRU2HPTLB-4NYGIbC0qSMyB0cORhgAEIxLFzoZxt2pwj26gJDLrkdYftR18jpOe_8vpnsQLUuPvmbP4FnpAW)

This diff moves the mcrouter options initialization to mcrouter.

Most part of this diff has been reviewed before (D83673550)but it was unlanded and I had to re-create it with few new changes after the last review

Here's the summary of new changes

1. the return type for  `createMcrouterOptionsForFlavor`  changed.
folly::Expected<McrouterOptions, std::string> -->
folly::Expected<McrouterOptions, std::optional<std::string>>
https://www.internalfb.com/diff/D85299813?permalink=1373296860992060

2. The way cacheclient processes the response back from `createMcrouterOptionsForFlavor`
https://www.internalfb.com/diff/D85299813?permalink=2229472284216739

3. Adding a killswitch to the entire feature
https://www.internalfb.com/diff/D85299813?permalink=2937397146649737

Reviewed By: ghostonhuang

Differential Revision: D85299813

fbshipit-source-id: 7ad96f0047893f29aad877ba46262faaee6e1bef

v2025.11.03.00

Toggle v2025.11.03.00's commit message
Move Mcrouter init from cc to mcrouter

Summary:
Redesign Luna<>Mcrouter migration.

As discussed in this doc , we want to have individual luna settings for each flavor and move mcrouter initialization from cc to inside mcrouter
[RFC | Use Luna settings For Mcrouter Config Management](https://l.facebook.com/l.php?u=https%3A%2F%2Fdocs.google.com%2Fdocument%2Fd%2F1d8XeW_9C5Le26Bs2gsHDH5JSzFKIbyCquxmXtQKRM3s%2Fedit%3Ftab%3Dt.0%23heading%3Dh.4d44m4ny7dxt&h=AT0p_c4MB5cAEWeI7n2ZHoi3kMIohRkTJI7pZJfVPyJOrM9k29XC39neyzZ-IoQcDO4GebtftRU2HPTLB-4NYGIbC0qSMyB0cORhgAEIxLFzoZxt2pwj26gJDLrkdYftR18jpOe_8vpnsQLUuPvmbP4FnpAW)

This diff moves the mcrouter options initialization to mcrouter.

Most part of this diff has been reviewed before (D83673550)but it was unlanded and I had to re-create it with few new changes after the last review

Here's the summary of new changes

1. the return type for  `createMcrouterOptionsForFlavor`  changed.
folly::Expected<McrouterOptions, std::string> -->
folly::Expected<McrouterOptions, std::optional<std::string>>
https://www.internalfb.com/diff/D85299813?permalink=1373296860992060

2. The way cacheclient processes the response back from `createMcrouterOptionsForFlavor`
https://www.internalfb.com/diff/D85299813?permalink=2229472284216739

3. Adding a killswitch to the entire feature
https://www.internalfb.com/diff/D85299813?permalink=2937397146649737

Reviewed By: ghostonhuang

Differential Revision: D85299813

fbshipit-source-id: 7ad96f0047893f29aad877ba46262faaee6e1bef

v2025.10.27.00

Toggle v2025.10.27.00's commit message
clang-format | Format fbsource with clang-format 21.

Reviewed By: ChristianK275

Differential Revision: D85317706

fbshipit-source-id: b399c5c4b75252999442b7d7d2778e7a241b0025

v2025.10.20.00

Toggle v2025.10.20.00's commit message
Fix CQS signal readability-named-parameter in fbcode/admarket/targeti…

…ng/lookalike_trainer

Differential Revision: D84689400

fbshipit-source-id: 4db7f30d7564bac3795cf4172b57616779c66fa6

v2025.10.13.00

Toggle v2025.10.13.00's commit message
support periodic mcrouter config dumps

Summary: It runs a thread every five minutes to dump mcrouter config. It stores filename->hash mapping and only writes the file if it hasn't changed.

Reviewed By: lenar-f

Differential Revision: D82968849

fbshipit-source-id: 56eca25fb41f0da7d6df8f879d75b1181aa4f699

v2025.10.06.00

Toggle v2025.10.06.00's commit message
Simplify skip_thread_affinity

Summary:
We can simplify, thanks to the changes introduced by the previous diff.

In addition, fixed a couple of issues:

- `skip_thread_affinity` now works everywhere

- `jump_threads` now makes sure that `skip_thread_affinity` is not set.

#buildmore

Reviewed By: disylh

Differential Revision: D83686011

fbshipit-source-id: 16445a0b964cf7ab7cb637992537f9739fc3a751