Last 12 weeks · 56 commits
4 of 6 standards met
Upstream OSS memcached has had support for meta commands for a few years now, with a pending feature request to have mcrouter support them (#335). Since they greatly simplify implementing common caching strategies and also synergize well with some mcrouter features (e.g. WarmupRoute could benefit from ), it makes sense to implement these. This PR adds basic support needed for the metaget () command to the ASCII parser and serializer and the shared Thrift IDL, without updating individual route logic yet (beyond what's needed to get BigValueRoute to compile). So an mcrouter built from this branch should be able to relay commands but the behavior might not yet make sense for all routes. The ASCII parsing notably deviates from the upstream spec in that flags aren't returned in the same order as given in the request. It's unclear to me based on the wording there whether this is meant to be strict or not; if clients don't rely on this behavior it's probably best to leave it as-is instead of convoluted logic to pass the flag order onto AsciiSerializer somehow. Note:** I realize Memcache.thrift and assorted files are generated but since the Carbon codegen is private, I opted to add the needed code by hand to this PR so that it compiles for OSS users. I can make another PR without those changes, if needed.
Extend the CMake build system added in D91269570 to also build / run tests. I mainly went for one listfile per subdirectory but lumped in smaller disparate tests under mcrouter/lib into a single target for simplicity. I omitted tests under mcrouter/lib/carbon/ as their utility for OSS mcrouter is limited compared to the scaffolding needed to run them (they interdepend on utilities from mcrouter/lib/network/test). No changes to existing test files beyond the minimum needed to fix compilation, so there are many expected failures in an OSS run. Tested using a fresh copy of fbcode_builder.
The build system currently takes an optional package version override via the define but this is rather generic and also used by other projects e.g. fizz. If fed into via , it inadvertently gets used by these other projects too and can cause errors if the version override format doesn't match their expectations. So use a project-specific prefix instead.
Summary: Adds the field to (mirrors the existing and fields), and updates the carbon compiler template to emit a block in every generated . This is the wire-format support for Generalized KCB: callers set and the transport writes the thrift header on the outgoing thrift call so the UCache server can bind the cache key to the named ACL group Reviewed By: antonf Differential Revision: D104245265
Summary: X-link: https://github.com/facebook/hhvm/pull/9778 X-link: https://github.com/facebookresearch/DCPerf/pull/621 Propagate the as a Thrift header from clients through mcrouter to DevProxy. We capture the context before enqueuing the request in the mcrouter message queue. And then we set the header in the mcrouter Thrift transport layer. Diagram: We are focusing on Thrift transport exclusively as we are trying to close gaps in DevProxy layer. Reviewed By: ghostonhuang Differential Revision: D105269091
Repository: facebook/mcrouter. Description: Mcrouter is a memcached protocol router for scaling memcached deployments. Stars: 3334, Forks: 554. Primary language: C++. Languages: C++ (91.8%), Python (3.7%), C (1.1%), M4 (1%), Thrift (0.8%). License: MIT. Latest release: v0.41.0-release (6y ago). Open PRs: 19, open issues: 97. Last activity: 1d ago. Community health: 75%. Top contributors: andreazevedo, jmswen, stuclar, alikhtarov, spalamarchuk, disylh, glamtechie, yfeldblum, andriigrynenko, ngoyal and others.