Skip to content

Commit 48a4982

Browse files
authored
Temporary Revert "Using Radix tree instead of Trie (#40160)" (#40341)
This reverts commit 49a2a87. We want to wait until after the release to give this more testing time before it is included in a release. Signed-off-by: Ryan Northey <[email protected]>
1 parent 5abd18b commit 48a4982

File tree

14 files changed

+13
-979
lines changed

14 files changed

+13
-979
lines changed

changelogs/current.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,6 @@ new_features:
387387
- area: alts
388388
change: |
389389
Added environment variable-protected gRPC keepalive params to the ALTS handshaker client.
390-
- area: dns_filter, redis_proxy and prefix_matcher_map
391-
change: |
392-
Using Radix Tree instead of Trie for performance improvements.
393390
- area: wasm
394391
change: |
395392
Added support for returning ``StopIteration`` from plugin ``onRequestHeader`` and ``onResponseHeader`` callbacks. See

source/common/common/BUILD

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -483,16 +483,6 @@ envoy_cc_library(
483483
hdrs = ["trie_lookup_table.h"],
484484
)
485485

486-
envoy_cc_library(
487-
name = "radix_tree_lib",
488-
hdrs = ["radix_tree.h"],
489-
deps = [
490-
":assert_lib",
491-
"@com_google_absl//absl/container:flat_hash_map",
492-
"@com_google_absl//absl/strings",
493-
],
494-
)
495-
496486
envoy_cc_library(
497487
name = "utility_lib",
498488
srcs = ["utility.cc"],

source/common/common/radix_tree.h

Lines changed: 0 additions & 302 deletions
This file was deleted.

source/common/matcher/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ envoy_cc_library(
2929
hdrs = ["prefix_map_matcher.h"],
3030
deps = [
3131
":map_matcher_lib",
32-
"//source/common/common:radix_tree_lib",
32+
"//source/common/common:trie_lookup_table_lib",
3333
"//source/common/runtime:runtime_features_lib",
3434
],
3535
)

source/common/matcher/prefix_map_matcher.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "source/common/common/radix_tree.h"
3+
#include "source/common/common/trie_lookup_table.h"
44
#include "source/common/matcher/map_matcher.h"
55
#include "source/common/runtime/runtime_features.h"
66

@@ -52,7 +52,7 @@ template <class DataType> class PrefixMapMatcher : public MapMatcher<DataType> {
5252
}
5353

5454
private:
55-
RadixTree<std::shared_ptr<OnMatch<DataType>>> children_;
55+
TrieLookupTable<std::shared_ptr<OnMatch<DataType>>> children_;
5656
};
5757

5858
} // namespace Matcher

source/extensions/filters/network/redis_proxy/command_splitter_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "envoy/stats/timespan.h"
1010

1111
#include "source/common/common/logger.h"
12-
#include "source/common/common/radix_tree.h"
12+
#include "source/common/common/trie_lookup_table.h"
1313
#include "source/common/stats/timespan_impl.h"
1414
#include "source/extensions/filters/network/common/redis/client_impl.h"
1515
#include "source/extensions/filters/network/common/redis/fault_impl.h"
@@ -501,7 +501,7 @@ class InstanceImpl : public Instance, Logger::Loggable<Logger::Id::redis> {
501501
CommandHandlerFactory<RoleRequest> role_handler_;
502502
CommandHandlerFactory<SplitKeysSumResultRequest> split_keys_sum_result_handler_;
503503
CommandHandlerFactory<TransactionRequest> transaction_handler_;
504-
RadixTree<HandlerDataPtr> handler_lookup_table_;
504+
TrieLookupTable<HandlerDataPtr> handler_lookup_table_;
505505
InstanceStats stats_;
506506
TimeSource& time_source_;
507507
Common::Redis::FaultManagerPtr fault_manager_;

source/extensions/filters/network/redis_proxy/router_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "envoy/type/v3/percent.pb.h"
1414
#include "envoy/upstream/cluster_manager.h"
1515

16-
#include "source/common/common/radix_tree.h"
16+
#include "source/common/common/trie_lookup_table.h"
1717
#include "source/common/http/header_map_impl.h"
1818
#include "source/common/stream_info/stream_info_impl.h"
1919
#include "source/extensions/filters/network/common/redis/supported_commands.h"
@@ -86,7 +86,7 @@ class PrefixRoutes : public Router, public Logger::Loggable<Logger::Id::redis> {
8686
const StreamInfo::StreamInfo& stream_info);
8787

8888
private:
89-
RadixTree<PrefixSharedPtr> prefix_lookup_table_;
89+
TrieLookupTable<PrefixSharedPtr> prefix_lookup_table_;
9090
const bool case_insensitive_;
9191
Upstreams upstreams_;
9292
PrefixSharedPtr catch_all_route_;

0 commit comments

Comments
 (0)