Skip to content

[pull] master from apache:master #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 482 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
482 commits
Select commit Hold shift + click to select a range
d4695c9
Add UT of ScopeGuard (#2569)
chenBright Mar 18, 2024
e144702
Fix compile with protobuf 22-25. (#2576)
ketor Mar 21, 2024
e11c84d
Update commiter doc
wwbmmm Mar 21, 2024
8b340f9
Get gcc version by script to support cross-compile (#2567)
wasphin Mar 22, 2024
338e95c
Merge pull request #2550 from BusyJay/BusyJay-patch-1
Huixxi Mar 24, 2024
8f7a10e
Merge pull request #2571 from chenBright/opt_stream_overcrowded
Huixxi Mar 24, 2024
b776ead
Use sync log for crash fatal log
chenBright Mar 26, 2024
8a83525
Merge pull request #2583 from chenBright/sync_crash_fatal_log
lorinlee Mar 29, 2024
3f13b43
fix typo
YinZheng-Sun Mar 29, 2024
c3200a4
Merge branch 'apache:master' into fix_typo
YinZheng-Sun Mar 29, 2024
8fb0b42
Merge pull request #2586 from YinZheng-Sun/fix_typo
lorinlee Mar 30, 2024
b8670f5
修复rpc_channel_connection_count (#2580)
yyweii Apr 1, 2024
cbbb823
support bthread primitive cross different worker pools (#2551)
yanglimingcn Apr 1, 2024
ca92daa
Install gdb for linux ci (#2587)
chenBright Apr 1, 2024
16ab5b5
Do not link abseil interface targets (#2592)
wasphin Apr 8, 2024
337142f
Support on_failed callback for streaming rpc (#2565)
chenBright Apr 8, 2024
c666ea4
Support shutdown write and notify for success write (#2547)
chenBright Apr 8, 2024
498c3e1
Support IOBuf Profiler (#2497)
chenBright Apr 8, 2024
d7eca39
ci: fixed protobuf and abseil versions (#2596)
wasphin Apr 9, 2024
bbd88a8
Fix IOBuf profiler rate (#2601)
chenBright Apr 22, 2024
6a335aa
Fix ci (#2611)
chenBright Apr 23, 2024
be22f1c
remove old rpcz directory even if program crash
yanglimingcn Apr 22, 2024
68aff69
update bthread tag docs (#2607)
yanglimingcn Apr 26, 2024
7230347
Fix incorrect core file found in run_tests.sh (#2614)
chenBright Apr 29, 2024
58cc798
Release 1.9.0 (#2616)
serverglen Apr 29, 2024
0128bb1
Update protobuf version in doc (#2618)
chenBright Apr 29, 2024
f97cbe5
Fix FlatMap assign operator bug (#2622)
chenBright Apr 29, 2024
4c5fad0
Restrict BRPC_VALIDATE_GFLAG to global scope and namespace scope only…
chenBright May 6, 2024
edb9caf
Fix comparison warning in http2_rpc_protocol.cpp (#2626)
imdouyu May 6, 2024
7a8df46
Update oncall list
wwbmmm May 6, 2024
5864de6
save span with minmum latency us
yanglimingcn Apr 22, 2024
fb7188b
bthread set concurrency by tag
yanglimingcn Apr 30, 2024
3ce3bc5
Support SCOPE_EXIT macro
chenBright May 12, 2024
8baf6d1
cmd line not contains absolute path
ehds May 13, 2024
9f61626
rm duplicate comment
ehds May 15, 2024
450deb4
Rename
chenBright May 16, 2024
66b7739
Merge pull request #2628 from yanglimingcn/bugfix/bthread_concurrency…
yanglimingcn May 19, 2024
ff140be
Merge pull request #2644 from ehds/fix-can-not-recognize-absolute-pat…
yanglimingcn May 19, 2024
b601c89
Merge pull request #2643 from chenBright/scope_exit
yanglimingcn May 19, 2024
b339a7b
update
MJY-HUST May 22, 2024
f81af91
Add virtual destructors to MongoServiceAdaptor and SpanFilter (#2651)
yozhao May 26, 2024
c707aa3
update by comments
MJY-HUST May 26, 2024
bdc141c
Opt performance of async log (#2602)
chenBright May 27, 2024
ddb253f
update
MJY-HUST May 27, 2024
0fb0655
fix
MJY-HUST May 28, 2024
d279324
update test for using_pool
MJY-HUST May 28, 2024
c2bc88b
fix format
MJY-HUST May 29, 2024
976c588
circuit breaker with half open state (#2634)
jiangyt-git Jun 3, 2024
122355a
EventDispatcher supports various IO types (#2560)
chenBright Jun 3, 2024
4f85335
Fix invalid headers of multiple cookie and set-cookie (#2577)
chenBright Jun 3, 2024
3775b41
Support FastPthreadMutex contention profiler && expose FastPthreadMut…
chenBright Jun 3, 2024
b7092a7
Reject http request without host (#2600)
chenBright Jun 3, 2024
a0984f6
Support more meta for ServerNode (#2603)
chenBright Jun 3, 2024
59a68dd
Fix max concurrency of thrift protocol and nshead protocol (#2613)
chenBright Jun 3, 2024
02fd47c
Support thread local object iteration (#2632)
chenBright Jun 3, 2024
98edccf
format
MJY-HUST Jun 5, 2024
556e56b
[feat] latency scale factor (#2655)
superhail Jun 10, 2024
f8558b0
fixbug: there is a ',' before 'quantile=' when labels is empty (#2659)
renzhong Jun 10, 2024
efcaba7
Change KeyTableList from class to struct
MJY-HUST Jun 11, 2024
0f5e102
Support proxy and generic call of baidu protocol (#2629)
chenBright Jun 13, 2024
15469ed
Support connect on socket create (#2574)
chenBright Jun 13, 2024
2e18318
fix h2 rpc_dump mem leak bug (#2661)
GreateCode Jun 13, 2024
f12bc52
socket: fix potential double close (#2663)
BusyJay Jun 24, 2024
edfc007
Fix uninitialized local side of Socket
chenBright Jun 26, 2024
931ef3e
Add debug log for Socket health check
chenBright Jul 1, 2024
81ae605
Merge pull request #2610 from yanglimingcn/bugfix/remove_old_rpcz_dir…
yanglimingcn Jul 3, 2024
9c387c0
fix bug: switch between stream_rpc and baidu_std
howarlii Jul 3, 2024
fdc60ba
Merge pull request #2678 from howarle/fix_stream_rpc
Huixxi Jul 7, 2024
7557004
Merge pull request #2673 from chenBright/debug_hc
Huixxi Jul 7, 2024
8b9138a
Merge pull request #2672 from chenBright/fix_local_side
Huixxi Jul 7, 2024
5f991fe
Merge pull request #2645 from MJY-HUST/keytable_optimize
Huixxi Jul 7, 2024
8b5571f
Fix multi FlatMap scale and size (#2669)
chenBright Jul 11, 2024
e0c9c44
Support pthread mutex deadlock detection
chenBright Jul 14, 2024
9d23af8
add bzlmod support (#2670)
oathdruid Jul 14, 2024
df47a63
Use LOG instead of CHECK
chenBright Jul 15, 2024
3419a3d
Bump to version 1.10.0 (#2700)
wasphin Jul 18, 2024
d227d93
Merge pull request #2692 from chenBright/detect_deadlock
lorinlee Jul 19, 2024
75763d4
Fix malloc deadlock caused by contention profiler (#2684)
chenBright Jul 23, 2024
a48d4ce
bump bzlmod version to 1.10.0 (#2705)
oathdruid Jul 23, 2024
7a89de7
Fix rdma complie error (#2707)
chenBright Jul 25, 2024
5ae6ad6
Add release doc about update version in MODULE.bazel (#2711)
oathdruid Jul 26, 2024
fc56be6
add openSSL_ROOT_DIR check on macos (#2716)
lqxhub Jul 29, 2024
455310a
Fix baidu master service leak (#2717)
chenBright Jul 29, 2024
1bb0fca
Fix tcp connect interrupt (#2664)
chenBright Jul 29, 2024
64ce760
Support multiple RPCs parsing in wireshark dissector for baidu_std pr…
AnDiXL Jul 29, 2024
b4d4acb
[MPSQ] fix a memleak in butil::ObjectPoolAllocator (#2725)
live4thee Aug 6, 2024
eb31758
Fix rdma remove consumer error (#2720)
chenBright Aug 8, 2024
c709c96
Fix compilation errors of SerializedResponse (#2722)
chenBright Aug 8, 2024
ff1d3ba
fix gflags validate error
MJY-HUST Aug 8, 2024
658ac6b
Fix link of CODE_OF_CONDUCT.md in pull request template (#2735)
chenBright Aug 12, 2024
3e26710
support jemalloc profiler
GreateCode Aug 15, 2024
7ca3c9a
fix Darwin mallctl
GreateCode Aug 15, 2024
7874a4a
fix Darwin mallctl
GreateCode Aug 15, 2024
8301856
delete unuse fn
GreateCode Aug 15, 2024
3914b3f
fix License
GreateCode Aug 15, 2024
a47fdd5
update
MJY-HUST Aug 18, 2024
25130b4
Fix pthread_mutex_trylock deadlock in jemalloc (#2727)
chenBright Aug 20, 2024
ebdbc97
update user manual
GreateCode Aug 20, 2024
15a6cca
update user manual
GreateCode Aug 20, 2024
d033ed3
update user manual
GreateCode Aug 21, 2024
d79f0d3
[#2740] fix example/rdma_performance compilation error (#2741)
ivanallen Aug 22, 2024
9a1a9b2
fix mpsc queue cur enqueue node to atomic exhange (#2739)
yanglimingcn Aug 22, 2024
48996cf
Support rpc protobuf message factory interface (#2718)
chenBright Aug 26, 2024
d3c6854
Merge pull request #2730 from MJY-HUST/fix_gflags_validate
yanglimingcn Aug 27, 2024
ffffe4f
update doc and comments
GreateCode Aug 27, 2024
c4cd404
support stats print
GreateCode Aug 29, 2024
8cc02e5
support stats print
GreateCode Aug 29, 2024
30af6a8
use BAIDU_WEAK
GreateCode Aug 29, 2024
99b4f76
memory service support jemalloc stats
GreateCode Sep 2, 2024
b9dd528
add comment
GreateCode Sep 2, 2024
2c6644b
make CheckHealth public for users to use this function. (#2747)
ketor Sep 2, 2024
fea2952
Active Spinning and queue old bthread at the head for bthread mutex (…
chenBright Sep 6, 2024
0a64fdf
Make periodic_task.h a self-contained header file (#2758)
chuandew Sep 6, 2024
c5b544f
support jemalloc profiler flamegraph
GreateCode Sep 7, 2024
8fdff32
add note: graceful quit in docs
GreateCode Sep 8, 2024
cdc8101
Fix missing extern of tls_task_group (#2759)
chenBright Sep 8, 2024
9643150
Support arena rpc pb message factory (#2751)
chenBright Sep 8, 2024
3a803f0
update doc
GreateCode Sep 11, 2024
5b770b5
Support noncopyable sync objects
chenBright Sep 17, 2024
8fa216c
Merge pull request #2766 from chenBright/noncopyable_sync
lorinlee Sep 20, 2024
36353ef
Merge pull request #2737 from GreateCode/jemalloc_profiler
yanglimingcn Sep 23, 2024
d681b1c
fix unittest on cmake (#2771)
zhooooong Sep 25, 2024
c727dd7
Use ManualConstructor(AlignedMemory) instead of std::aligned_storage …
chenBright Sep 26, 2024
bb284cf
Support backup request policy (#2734)
chenBright Sep 26, 2024
f7b4a0f
Send unauthorized response to client when authentication fails (#2744)
chenBright Sep 26, 2024
f17048e
Support semaphore and rwlock for bthread (#2752)
chenBright Sep 26, 2024
2c74ab5
Fix Socket check failed with invalid fd of Stream (#2776)
chenBright Oct 7, 2024
249bc51
Make bthread semaphore and rwlock noncopyable (#2773)
chenBright Oct 7, 2024
d94c88f
Optimize keytablelist implementation (#2768)
MJY-HUST Oct 7, 2024
7e5ec4f
Batch create and accept stream (#2754)
jenrryyou Oct 9, 2024
9680d31
Support timedlock of fast/hook pthread and bthread::Mutex (#2760)
chenBright Oct 9, 2024
8d8a296
wrap the class name in single quotes (#2732)
ehds Oct 11, 2024
f4e00ac
Support detection of mutex deadlock caused by double lock (#2765)
chenBright Oct 13, 2024
667b96a
Add a method option to disable check eovercrowded on server side (#2774)
superhail Oct 14, 2024
f6f76dd
Only support batch butex wake with the same tag (#2778)
yanglimingcn Oct 15, 2024
938bf46
add check for bthread_setconcurrency_by_tag (#2784)
yanglimingcn Oct 15, 2024
d39a490
add required headers to fix unittest compilation (#2787)
wasphin Oct 16, 2024
5cdf22f
switch boost dependency in bzlmod to bcr (#2789)
oathdruid Oct 17, 2024
c273d91
Update RELEASE_VERSION
Huixxi Oct 20, 2024
47f8d4b
Update MODULE.bazel
Huixxi Oct 20, 2024
f960520
Update CMakeLists.txt
Huixxi Oct 20, 2024
04d15c0
Update brpc.spec
Huixxi Oct 20, 2024
6221f41
Update release_cn.md
Huixxi Oct 27, 2024
633039c
Fix memory leak of ArenaRpcPBMessageFactory (#2798)
chenBright Oct 29, 2024
dae4b4d
Fix bad link in document and code (#2799)
mapleFU Oct 29, 2024
9351c07
Update release_cn.md
Huixxi Oct 29, 2024
9574383
Merge pull request #2802 from apache/release-1.11
Huixxi Oct 29, 2024
d12d41c
Add missing #include <cstdint> (#2800)
Menci Oct 30, 2024
282776a
Add NonreflectableMessage and support Protobuf v5 (#2782)
wasphin Oct 30, 2024
e1bf467
set tags workers unlimitedly (#2801)
zhengJade Oct 31, 2024
30a56dd
Support user specific CMAKE_MODULE_PATH (#2806)
chenBright Nov 3, 2024
60c30c6
Support set_max_stats_count of MultiDimension
chenBright Nov 4, 2024
cf3d28f
Support backtrace log
chenBright Nov 5, 2024
db22ab6
Merge pull request #2813 from chenBright/max_stats
Huixxi Nov 9, 2024
0172f14
Merge pull request #2811 from chenBright/log_stack
Huixxi Nov 9, 2024
72ce354
Upgrade Protobuf to v27.3 for building with bzlmod (#2823)
wasphin Nov 19, 2024
67eb4ef
Change the default value of the bthread_tag in class ServerOptions to…
MJY-HUST Nov 24, 2024
cb25e15
Update release_schedule.md
Huixxi Nov 25, 2024
579a625
Update release schedule
wwbmmm Nov 26, 2024
bb527a1
Upgrade upload-artifact version (#2827)
wwbmmm Nov 26, 2024
4035c80
initialize LogStream._backtrace to fixed randomly printed stacktraces
jamesge Nov 26, 2024
8d1ee6d
Support Protobuf v29
wasphin Nov 28, 2024
b82f2b8
Fix build instructions in getting_started.md (#2832)
Zzhiter Nov 30, 2024
065f797
Merge pull request #2830 from wasphin/feature/protobuf-v29
lorinlee Nov 30, 2024
f187d2c
Method level option to ignore server eovercrowded (#2820)
superhail Dec 4, 2024
264ba31
keytablelist bugfix (#2835)
MJY-HUST Dec 6, 2024
6c0195f
docs: update build requirements (#2837)
wasphin Dec 8, 2024
53026cd
Small FlatMap optimization with default initialization (#2620)
chenBright Dec 9, 2024
f788f96
fix: use space instead of tab (#2840)
ssk01 Dec 10, 2024
1a02745
Fix unused private field warning of FastPthreadMutex (#2839)
chenBright Dec 10, 2024
282bc90
Fix build failure with -std=c++17 option (#2844)
tongke6 Dec 12, 2024
941f2e2
add support for bthread cpu usage
icexin Dec 5, 2024
103da1d
Merge pull request #2852 from icexin/bthread_cpu_time
cdjingit Dec 24, 2024
5c03414
Remove redundant const of ThreadLocal (#2855)
chenBright Dec 31, 2024
4158a17
Support variable arguments for ResourcePool and ObjectPool (#2859)
chenBright Jan 2, 2025
d02c7fd
Fix universal reference (#2862)
chenBright Jan 4, 2025
6b29a36
Instruct LeakSanitizer to ignore designated memory leaks of Server an…
chenBright Jan 6, 2025
a18463f
Support task tracer (#2851)
chenBright Jan 6, 2025
4c33f88
Support success limit of ParallelChannel (#2842)
chenBright Jan 6, 2025
609676d
Support tcp user timeout of client
chenBright Jan 12, 2025
47c1228
Merge pull request #2867 from chenBright/tcp_user_timeout
yanglimingcn Jan 14, 2025
e45e957
Fix some compilation warning issues (#2876)
chenBright Jan 16, 2025
6e0d1b3
Release 1.12.0 (#2875)
chenBright Jan 18, 2025
c93d0e0
Fix gflag namespace (#2877)
chenBright Jan 18, 2025
0608aa1
Fix gflag namespace of example and tools (#2879)
chenBright Jan 19, 2025
d72281f
Chore: minimize dependence to avoid protoc_lib containing main func i…
tongke6 Jan 23, 2025
f988b90
Release 1.12.1 (#2884)
chenBright Jan 25, 2025
002fd86
Fix release documents
chenBright Jan 29, 2025
f657257
fix memory leak issue #2871 (#2872)
w-gc Jan 29, 2025
cfe2537
Merge pull request #2887 from chenBright/fix_release_doc
lorinlee Jan 30, 2025
418abca
Fix build on macos with apple M1 chip (#2846)
tongke6 Feb 9, 2025
923d413
Support segment large stream messages automatically (#2889)
jenrryyou Feb 17, 2025
4005a08
Fix description of VersionedRefWithId (#2895)
chenBright Feb 19, 2025
f642491
add gflag max_multi_dimension_stats_count (#2894)
cdjingit Feb 20, 2025
71184b0
Support bthread tracer with bazel (#2905)
chenBright Mar 4, 2025
3e97efe
Update ubuntu-20.04 to ubuntu-22.04 in CI (#2909)
chenBright Mar 5, 2025
cffbd24
keep session info in RedisConnContext (#2902)
lintanghui Mar 6, 2025
77431a3
Reduce futex usage in ParkingLot (#2907)
JimChengLin Mar 6, 2025
cb1a620
Record latency of EventDispatcher (#2897)
chenBright Mar 6, 2025
b4ce61f
Fix format of prometheus service (#2899)
ZhengweiZhu Mar 12, 2025
df0fbdc
Fix ParkingLot::signal does not modify _pending_signal when there is …
chenBright Mar 15, 2025
e951ffb
Fix compiler optimize thread local variable access
zcfh Mar 18, 2025
2447f18
[#2913] fix link error if with glog (#2914)
ivanallen Mar 20, 2025
da4e33a
Support a more safe read function and variadic functions of DoublyBuf…
chenBright Mar 21, 2025
b6e4f03
Optimize server latency (#2886)
chenBright Mar 21, 2025
1c53314
Optimize zero copy of http body (#2915)
chenBright Mar 21, 2025
5c8bd06
Fix double free messages in baidu-std (#2924)
chenBright Mar 23, 2025
7a7d1c8
Support AddressSanitizer (#2890)
chenBright Mar 26, 2025
0c4f2a8
Fix some unstable UTs (#2928)
chenBright Mar 28, 2025
b38ffa4
jemalloc profiler support objects
GreateCode Mar 29, 2025
c7add74
Support ProtoJson formatted http body (#2921)
chenBright Mar 30, 2025
bf88565
support dynamic update method concurrency (#2923)
yanglimingcn Mar 30, 2025
ab66887
Remove the unused INVALID_PTHREAD_KEY (#2930)
chenBright Mar 31, 2025
15b52c5
Remove Incorrect log in RemoveServersInBatch (#2932)
chenBright Mar 31, 2025
f44f803
Fix asan switch fiber with error stack info (#2931)
chenBright Apr 2, 2025
9855697
Merge pull request #2929 from GreateCode/jemalloc_objects
lorinlee Apr 3, 2025
3d16b5b
Merge pull request #2918 from zcfh/fix-tls-variable-load
lorinlee Apr 3, 2025
0625945
Disable CondTest.too_many_bthreads_from_bthread in asan ut (#2940)
chenBright Apr 6, 2025
724e2fd
Fix class data for protobuf v27+ (#2941)
wasphin Apr 7, 2025
65b550e
use BAIDU_VOLATILE_THREAD_LOCAL to declare tls_bls to avoid error com…
BiteTheDDDDt Apr 8, 2025
c7ed9f6
Add headers to sub cntl. (#2943)
beesflower Apr 8, 2025
f8eb9ec
Nit enhance with const string (#2911)
SamYuan1990 Apr 11, 2025
d9dd7b0
Make socket default bthread tag right (#2948)
yanglimingcn Apr 13, 2025
a1877bc
Support various payload of baidu-std: json, proto-json and proto-text…
chenBright Apr 16, 2025
0270363
Fix thread safety of AgentCombiner (#2949)
chenBright Apr 17, 2025
1337db0
Fix batch create stream and make SetHostSocket thread safe (#2938)
jenrryyou Apr 18, 2025
ba9e838
Fix thread safety of Wrapper (#2952)
chenBright Apr 21, 2025
5575a92
change issue notification maillist
wwbmmm Apr 22, 2025
cab663f
chore: Enable GitHub Discussions (#2955)
tisonkun Apr 22, 2025
8875896
Add notification for discussions
wwbmmm Apr 22, 2025
a4e5436
Change issue and PR templates to encourage contributors to use English
wwbmmm Apr 22, 2025
decdf3e
Fix compile errors of json2pb (#2956)
chenBright Apr 24, 2025
3eb4041
iobuf support reserve_aligned (#2942)
yanglimingcn Apr 24, 2025
bf389c8
Fix HttpResponseSenderAsDone Run with NULL messages (#2958)
chenBright Apr 25, 2025
6ef4158
use standard alg to optimze comparator (#2959)
zhangqiongyu Apr 27, 2025
5a64de0
fix npe and reduce assignment instructions within the loop
zhangqiongyu Apr 29, 2025
011dabe
Make sure WeightedRandomizedLoadBalancer can traverse the whole serve…
chenBright May 8, 2025
c9a5924
fix typo
zhangqiongyu May 9, 2025
4a0f411
feat: 支持channel维度设置rpc级别健康检查参数
May 6, 2025
84071ed
feat: change members to a single HealthCheckOption member && update C…
May 9, 2025
96f5d9a
feat: add health_check_option.h
May 10, 2025
ffaa7ba
feat: reduce the failure rate of brpc_load_balancer_unittest
May 10, 2025
118289f
Release 1.13.0
lorinlee May 11, 2025
c47ec71
Merge pull request #2966 from lorinlee/release-1.13.0
lorinlee May 11, 2025
1c03278
Merge pull request #2964 from zhoukangsheng/support_health_check_option
Huixxi May 18, 2025
74ca596
Merge pull request #2962 from zhangqiongyu/feature/optimize_rdma
Huixxi May 18, 2025
5b0a6c1
epoll bthread deal first (#2819)
zhengJade May 22, 2025
6ef8b9d
Fix libunwind linked by default on x86_64 cpu when building via bazel…
tongke6 May 24, 2025
66e9635
Fix invalid url of thrift (#2975)
chenBright May 27, 2025
c24e641
Fix UT compilation errors with GCC 13 due to missing <cstdint> includ…
XueSongTap Jun 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix compile with protobuf 22-25. (apache#2576)
Signed-off-by: Ketor <[email protected]>
  • Loading branch information
ketor authored Mar 21, 2024
commit e1447025aeb9def25b5eb18073b3424635fc2808
8 changes: 8 additions & 0 deletions src/brpc/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@

// Since kDefaultTotalBytesLimit is private, we need some hacks to get the limit.
// Works for pb 2.4, 2.6, 3.0
#include "google/protobuf/stubs/common.h"
#if GOOGLE_PROTOBUF_VERSION < 4022000
#define private public
#include <google/protobuf/io/coded_stream.h>
const int PB_TOTAL_BYETS_LIMITS_RAW =
google::protobuf::io::CodedInputStream::kDefaultTotalBytesLimit;
const uint64_t PB_TOTAL_BYETS_LIMITS =
PB_TOTAL_BYETS_LIMITS_RAW < 0 ? (uint64_t)-1LL : PB_TOTAL_BYETS_LIMITS_RAW;
#undef private
#else
#include <google/protobuf/io/coded_stream.h>
const int PB_TOTAL_BYETS_LIMITS_RAW = INT_MAX;
const uint64_t PB_TOTAL_BYETS_LIMITS =
PB_TOTAL_BYETS_LIMITS_RAW < 0 ? (uint64_t)-1LL : PB_TOTAL_BYETS_LIMITS_RAW;
#endif

#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
#include <google/protobuf/text_format.h>
Expand Down
2 changes: 1 addition & 1 deletion src/json2pb/json_to_pb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ bool JsonValueToProtoMessage(const BUTIL_RAPIDJSON_NAMESPACE::Value& json_value,
for (int i = 0; i < descriptor->extension_range_count(); ++i) {
const google::protobuf::Descriptor::ExtensionRange*
ext_range = descriptor->extension_range(i);
#if GOOGLE_PROTOBUF_VERSION < 4022000
#if GOOGLE_PROTOBUF_VERSION < 4025000
for (int tag_number = ext_range->start; tag_number < ext_range->end; ++tag_number)
#else
for (int tag_number = ext_range->start_number(); tag_number < ext_range->end_number(); ++tag_number)
Expand Down
2 changes: 1 addition & 1 deletion src/json2pb/pb_to_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bool PbToJsonConverter::Convert(const google::protobuf::Message& message, Handle
for (int i = 0; i < ext_range_count; ++i) {
const google::protobuf::Descriptor::ExtensionRange*
ext_range = descriptor->extension_range(i);
#if GOOGLE_PROTOBUF_VERSION < 4022000
#if GOOGLE_PROTOBUF_VERSION < 4025000
for (int tag_number = ext_range->start; tag_number < ext_range->end; ++tag_number)
#else
for (int tag_number = ext_range->start_number(); tag_number < ext_range->end_number(); ++tag_number)
Expand Down