Skip to content

Tags: liupeng0518/mcrouter

Tags

v2024.07.29.00

Toggle v2024.07.29.00's commit message
Make RIM compile within memcache

Summary:
In this approach, we create a weakly defined symbol in TargetHooks.cpp that is defined in the mcrouter-core target and conditionally checked and invoked in the gen utils visitor.

This approach minimizes the amount of changes we want to make as opposed to previous approaches (most of which required making changes to hundreds of target files).

Here we do a few things to make this work:
1. In rim's stats.cpp TARGET, we have to change the odsl library to use the "via_mcrouter" flavor of those targets. autodeps wants to change it back, but that will immediately trigger circular dependencies. For good measure I added, autodeps-skip nocodemods to that target.

2. stuclar taught me about nm and how I can dump the symbols that are compiled in the different modes (dev/opt). I dumped the symbols when building mcrouter_core in both dev and opt mode and I see that gRIMReport is NOT a weak symbol, which IIUC is what we desire.

	P1430729979, P1430693327 have the full pastes.

opt mode:
> 0000000000000000 W _ZN8facebook8memcache8mcrouter10gRIMReportERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EERKSt13unordered_mapIS8_mSt4hashIS8_ESt8equal_toIS8_ESaISt4pairIKS8_mEEE
> 0000000000000000 b _ZZN8facebook8memcache8mcrouter10gRIMReportERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EERKSt13unordered_mapIS8_mSt4hashIS8_ESt8equal_toIS8_ESaISt4pairIKS8_mEEEE14LOGGING_helper

dev mode:
> 00000000002055f0 W _ZN8facebook8memcache8mcrouter10gRIMReportERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EERKSt13unordered_mapIS8_mSt4hashIS8_ESt8equal_toIS8_ESaISt4pairIKS8_mEEE
> _ZZN8facebook8memcache8mcrouter10gRIMReportERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EERKSt13unordered_mapIS8_mSt4hashIS8_ESt8equal_toIS8_ESaISt4pairIKS8_mEEEE14LOGGING_helper

Edit on Version 6:
1. I've extracted productId and plumbed it to RIM.
2. Swayze Test: https://www.internalfb.com/intern/hhvm/automator/workflows/134338/

Another Swayze Test (with CD_MEMCACHE_ATTRIBUTION used):
https://www.internalfb.com/intern/hhvm/automator/workflows/140328/

Reviewed By: stuclar

Differential Revision: D57884193

fbshipit-source-id: 77f67f14b2db93018b668411a9cdc40c043ae4cf

v2024.07.22.00

Toggle v2024.07.22.00's commit message
Remove routing hint (tech debt)

Summary:
This was an optimization we introduced for Memcache back in 2021. The idea was to pass the host returned by `getConsistentHashHost()` back to the routing layer (SR) as a "routing hint". SR could then avoid performing host selection again.

Unfortunately this optimization did not play well with failovers, and we were forced to disable it almost immediately. It was quickly forgotten and became tech debt.

I don't think there is any value in trying to rescue this optimization. The cost (in terms of engineering hours and code complexity) is probably not worth any potential gains in performance, if any. Today SR uses a dedicated uCache route handle tree, which includes a streamlined connection pool implementation, so any gains from a routing hint would be minimal or nil.

Reviewed By: stuclar

Differential Revision:
D56376007

Privacy Context Container: L1225223

fbshipit-source-id: 45ed61a4bf255c14368d44076aa71f01d8d6d9ed

v2024.07.15.00

Toggle v2024.07.15.00's commit message
Add CarbonResultInvalidRequest thrift exception

Summary: Add CarbonResultInvalidRequest thrift exception. This exception is for invalid request type of errors and is not retryable. This exception is used by UcMultiGet/UcMultiFill added in D54469882. Will let UcMultiGet/UcMultiFill actually raise this exception after it is rolled out to clients.

Reviewed By: stuclar

Differential Revision: D59596456

fbshipit-source-id: a43a38e9bf5e9729a260dab3da0964eda06363de

v2024.07.08.00

Toggle v2024.07.08.00's commit message
Applying BLACK formatting

Summary:
Removed fbcode/mcrouter from the BLACK opt-outs and applied formatting
With:
    hg files fbcode/mcrouter | arc lint --take BLACK --apply-patches -

Reviewed By: zertosh

Differential Revision: D59398136

fbshipit-source-id: 74eff5e0b16d08410effeea45b382e23105e4cab

v2024.07.01.00

Toggle v2024.07.01.00's commit message
Deshim TestUtil in mcrouter

Summary:
The following rules were deshimmed:
```
//folly/experimental:test_util -> //folly/testing:test_util
```

The following headers were deshimmed:
```
folly/experimental/TestUtil.h -> folly/testing/TestUtil.h
```

This is a codemod. It was automatically generated and will be landed once it is approved and tests are passing in sandcastle.
You have been added as a reviewer by Sentinel or Butterfly.

p:detuv.mcrouter

Reviewed By: praihan

Differential Revision: D58833810

fbshipit-source-id: 4f150bbd1ce273bda2b340d45ea9fe2f9a4ceaca

v2024.06.24.00

Toggle v2024.06.24.00's commit message
expose connId and security protocol to TServerObserver via Connection…

…Info

Summary: TSIA, with this change, we will be able to expose server side counters for TLS12, Fizz, stopTLS, kTLS etc

Reviewed By: sazonovkirill

Differential Revision: D58368765

fbshipit-source-id: ca5580edf30dba70a9b2382065df6c1fd5343f76

v2024.06.17.00

Toggle v2024.06.17.00's commit message
expose connId and security protocol to TServerObserver via Connection…

…Info

Summary: TSIA, with this change, we will be able to expose server side counters for TLS12, Fizz, stopTLS, kTLS etc

Reviewed By: sazonovkirill

Differential Revision: D58368765

fbshipit-source-id: ca5580edf30dba70a9b2382065df6c1fd5343f76

v2024.06.10.00

Toggle v2024.06.10.00's commit message
Deshim ReadMostlySharedPtr in mcrouter

Summary:
The following rules were deshimmed:
```
//folly/experimental:read_mostly_shared_ptr -> //folly/concurrency/memory:read_mostly_shared_ptr
```

The following headers were deshimmed:
```
folly/experimental/ReadMostlySharedPtr.h -> folly/concurrency/memory/ReadMostlySharedPtr.h
```

This is a codemod. It was automatically generated and will be landed once it is approved and tests are passing in sandcastle.
You have been added as a reviewer by Sentinel or Butterfly.

p:ad_drmspx.mcrouter

Reviewed By: yfeldblum

Differential Revision: D58152387

fbshipit-source-id: f4014cf32ad4927e3b24b960eaeb76f5e2259b6d

v2024.06.03.00

Toggle v2024.06.03.00's commit message
Move default cert flag to a separate method

Summary: Reintroduction of D57737100 with fix for Thrift build

Differential Revision: D57970247

fbshipit-source-id: 55815037522533aadf01f04813a4edb6b050a30b

v2024.05.27.00

Toggle v2024.05.27.00's commit message
Use folly::Init in standalone main()

Summary: Installs logging for fatal signals and exceptions

Reviewed By: stuclar

Differential Revision: D57798214

fbshipit-source-id: 9a59e003488e0570f7352e34b8989e2343c402f9