Code Monkey home page Code Monkey logo

fb303's Introduction

fb303

fb303 is a base Thrift service and a common set of functionality for querying stats, options, and other information from a service.

Dependencies

fb303 depends on

And all transitive dependencies of the above.

Using fb303 for your service

You can have your own thrift service interface extend fb303_core.BaseService to utilize the fb303 API. Some of the primary interfaces defined by fb303 are:

  • getStatus() - Query the state of a running service.
  • getCounters() - Get custom statistics about the performance and behavior of a service.
  • getExportedValues() - Get arbitrary string values exported by a service. This can be used to export things such as the build metadata (version info and the source control commit ID it was built from) and other key configuration information.
  • getOptions() / setOption() - Get and set configurable service parameters.

C++ service handler implementations can extend facebook::fb303::BaseService for default implementations of the Thrift methods.

Curious about the name?

Wikipedia: http://en.wikipedia.org/wiki/Roland_TB-303

The TB-303 makes bass lines.

Bass is what lies underneath any strong tune.

fb303 is the shared root of all Thrift services.

fb303 ⇒ FacebookBase303.

Join the fb303 community

See the CONTRIBUTING file for how to help out.

License

fb303 is licensed under Apache 2.0 as found in the LICENSE file.

Note

fb303 is a dependency of many other projects at Facebook which expose Thrift interfaces; some which have been open-sourced. Examples include edenfs, proxygen, and fboss.

This project has evolved over many years, and parts of it predate C++11. While it provides useful functionality for service information reporting, it is not representative of modern C++ coding standards.

An early version of fb303 was originally open-sourced in the Apache Thrift project in 2008, and still exists in the Apache Thrift codebase under contrib/fb303/. The fb303 code has since continued evolving at Facebook. This version contained in this repository has significantly expanded functionality with regards to statistics tracking and reporting in C++ services.

fb303's People

Contributors

ahornby avatar amyreese avatar bigfootjon avatar chadaustin avatar cooperlees avatar dgrnbrg-meta avatar fanzeyi avatar genevievehelsel avatar gownta avatar iahs avatar jdelliot avatar krallin avatar lnicco avatar lukaspiatkowski avatar michel-slm avatar mshneer avatar ot avatar pedroerp avatar r-barnes avatar shri-khare avatar simpkins avatar snarkmaster avatar srikrishnagopu avatar udippant avatar vitaut avatar wez avatar xavierd avatar yfeldblum avatar zertosh avatar zhxchen17 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fb303's Issues

Enable automatic tagging

e.g. folly, proxygen, and (formerly) Thrift are given consistent tags weekly by TagIt.

As HHVM depends on the whole lot, these tags are useful for updating first-party dependencies.

Given that Proxygen now depends on fb303, it would be useful for HHVM if fb303 had these tags rather than having to manually find a roughly-corresponding rFBS, then a roughly corresponding github commit for it.

Tag releases?

Hi there,

I'm interested in packaging fb303 at Homebrew since it seems like it would enable useful features in our build of Watchman. However, we have a policy of building only from tagged commits.

Would you consider tagging releases in this repository? The same scheme used in other facebook repositories (e.g. folly, wangle, watchman) of weekly tags seems simple enough and works reasonably well for us.

Thanks!

Cmake build failing

I'm trying to get OpenR running, but I can not get an fb303 build. I hope you can help me to figure it out.

Cmake fails here:

2020-06-17T12:57:20.9023233Z CMake Error at build/fbcode_builder/CMake/FBPythonBinary.cmake:494 (add_dependencies):
2020-06-17T12:57:20.9023619Z   The dependency target "FBThrift::thrift_py.py_lib" of target
2020-06-17T12:57:20.9023761Z   "fb303_thrift_py.py_sources_built" does not exist.
2020-06-17T12:57:20.9023891Z Call Stack (most recent call first):
2020-06-17T12:57:20.9024253Z   build/fbcode_builder/CMake/FBThriftPyLibrary.cmake:104 (add_fb_python_library)
2020-06-17T12:57:20.9024424Z   build/fbcode_builder/CMake/FBThriftLibrary.cmake:63 (add_fbthrift_py_library)
2020-06-17T12:57:20.9024572Z   fb303/thrift/CMakeLists.txt:15 (add_fbthrift_library)
2020-06-17T12:57:20.9024642Z 

No idea where I can get this library from.

Full log:

2020-06-17T12:57:17.6175552Z + git clone https://github.com/facebook/fb303
2020-06-17T12:57:17.6216775Z Cloning into 'fb303'...
2020-06-17T12:57:19.7658614Z + mkdir -p /usr/local/src/fb303/_build
2020-06-17T12:57:19.7669914Z + cd /usr/local/src/fb303/_build
2020-06-17T12:57:19.7671005Z + CXXFLAGS=' -fPIC'
2020-06-17T12:57:19.7671601Z + CFLAGS=' -fPIC'
2020-06-17T12:57:19.7672055Z + cmake -DBUILD_SHARED_LIBS=ON ..
2020-06-17T12:57:19.8613933Z -- The CXX compiler identification is GNU 7.5.0
2020-06-17T12:57:19.9124339Z -- The C compiler identification is GNU 7.5.0
2020-06-17T12:57:19.9248120Z -- Check for working CXX compiler: /usr/bin/c++
2020-06-17T12:57:19.9922128Z -- Check for working CXX compiler: /usr/bin/c++ - works
2020-06-17T12:57:19.9945782Z -- Detecting CXX compiler ABI info
2020-06-17T12:57:20.0782526Z -- Detecting CXX compiler ABI info - done
2020-06-17T12:57:20.0974588Z -- Detecting CXX compile features
2020-06-17T12:57:20.0982859Z -- Detecting CXX compile features - done
2020-06-17T12:57:20.1011666Z -- Check for working C compiler: /usr/bin/cc
2020-06-17T12:57:20.1592519Z -- Check for working C compiler: /usr/bin/cc - works
2020-06-17T12:57:20.8654076Z CMake Warning (dev) at /usr/local/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
2020-06-17T12:57:20.8654449Z -- Detecting C compiler ABI info
2020-06-17T12:57:20.8658853Z   The package name passed to `find_package_handle_standard_args` (glog) does
2020-06-17T12:57:20.8659879Z   not match the name of the calling package (Glog).  This can lead to
2020-06-17T12:57:20.8660265Z -- Detecting C compiler ABI info - done
2020-06-17T12:57:20.8661104Z   problems in calling code that expects `find_package` result variables
2020-06-17T12:57:20.8661398Z -- Detecting C compile features
2020-06-17T12:57:20.8662025Z   (e.g., `_FOUND`) to follow a certain pattern.
2020-06-17T12:57:20.8662326Z -- Detecting C compile features - done
2020-06-17T12:57:20.8663394Z Call Stack (most recent call first):
2020-06-17T12:57:20.8663948Z -- Found gflags from package config /usr/lib/x86_64-linux-gnu/cmake/gflags/gflags-config.cmake
2020-06-17T12:57:20.8664798Z   build/fbcode_builder/CMake/FindGlog.cmake:17 (find_package_handle_standard_args)
2020-06-17T12:57:20.8665161Z -- Found glog: /usr/lib/x86_64-linux-gnu/libglog.so  
2020-06-17T12:57:20.8666164Z   CMakeLists.txt:35 (find_package)
2020-06-17T12:57:20.8666576Z -- Looking for pthread.h
2020-06-17T12:57:20.8667785Z This warning is for project developers.  Use -Wno-dev to suppress it.
2020-06-17T12:57:20.8668021Z -- Looking for pthread.h - found
2020-06-17T12:57:20.8668768Z 
2020-06-17T12:57:20.8669067Z -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
2020-06-17T12:57:20.8669762Z -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
2020-06-17T12:57:20.8670314Z -- Looking for pthread_create in pthreads
2020-06-17T12:57:20.8670729Z -- Looking for pthread_create in pthreads - not found
2020-06-17T12:57:20.8671126Z -- Looking for pthread_create in pthread
2020-06-17T12:57:20.8671907Z -- Looking for pthread_create in pthread - found
2020-06-17T12:57:20.8672468Z -- Found Threads: TRUE  
2020-06-17T12:57:20.8673226Z -- Found Boost: /usr/local/include (found suitable version "1.69.0", minimum required is "1.51.0") found components: context filesystem program_options regex system thread chrono date_time atomic 
2020-06-17T12:57:20.8673651Z -- Found folly: /usr/local
2020-06-17T12:57:20.8674057Z -- Check if compiler accepts -pthread
2020-06-17T12:57:20.8674453Z -- Check if compiler accepts -pthread - yes
2020-06-17T12:57:20.8674832Z -- Found FBThrift: /usr/local
2020-06-17T12:57:20.8675466Z -- Found fizz: /usr/local
2020-06-17T12:57:20.8676004Z -- Found wangle: /usr/local
2020-06-17T12:57:20.8676379Z -- Found YARPL: /usr/local
2020-06-17T12:57:20.8676750Z -- Found rsocket: /usr/local
2020-06-17T12:57:20.8896041Z -- Found Python 3: /usr/bin/python3.6
2020-06-17T12:57:20.8984834Z -- Configuring done
2020-06-17T12:57:20.9023233Z CMake Error at build/fbcode_builder/CMake/FBPythonBinary.cmake:494 (add_dependencies):
2020-06-17T12:57:20.9023619Z   The dependency target "FBThrift::thrift_py.py_lib" of target
2020-06-17T12:57:20.9023761Z   "fb303_thrift_py.py_sources_built" does not exist.
2020-06-17T12:57:20.9023891Z Call Stack (most recent call first):
2020-06-17T12:57:20.9024253Z   build/fbcode_builder/CMake/FBThriftPyLibrary.cmake:104 (add_fb_python_library)
2020-06-17T12:57:20.9024424Z   build/fbcode_builder/CMake/FBThriftLibrary.cmake:63 (add_fbthrift_py_library)
2020-06-17T12:57:20.9024572Z   fb303/thrift/CMakeLists.txt:15 (add_fbthrift_library)
2020-06-17T12:57:20.9024642Z 

Undefined symbols: "__ZTHN6apache6thrift15ServerInterface14requestParams_E"

I have been updating folly and others in Macports (to 2022.08.08), and the last port remaining is fb303, which fails for me on:

Undefined symbols:
  "__ZTHN6apache6thrift15ServerInterface14requestParams_E", referenced from:
      __ZN6apache6thrift6detail2si11AsyncTmPrepC4EPNS0_15ServerInterfaceEPNS0_19HandlerCallbackBaseE in BaseService.cpp.o
      __ZN6apache6thrift6detail2si11AsyncTmPrepC4EPNS0_15ServerInterfaceEPNS0_19HandlerCallbackBaseE in BaseService.cpp.o
      __ZN6apache6thrift6detail2si11AsyncTmPrepC4EPNS0_15ServerInterfaceEPNS0_19HandlerCallbackBaseE in BaseService.cpp.o
      __ZN6apache6thrift6detail2si11AsyncTmPrepD1Ev in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor24executeRequest_setOptionIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor24executeRequest_getOptionIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor31executeRequest_getExportedValueIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor37executeRequest_getRegexExportedValuesIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor25executeRequest_getCounterIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor31executeRequest_getRegexCountersIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor24executeRequest_getStatusIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor22executeRequest_getNameIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor25executeRequest_getVersionIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor31executeRequest_getStatusDetailsIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor26executeRequest_getCountersIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor32executeRequest_getExportedValuesIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor25executeRequest_getOptionsIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor25executeRequest_aliveSinceIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor25executeRequest_aliveSinceIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor25executeRequest_getOptionsIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor24executeRequest_getOptionIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor24executeRequest_setOptionIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor31executeRequest_getExportedValueIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor37executeRequest_getRegexExportedValuesIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor32executeRequest_getExportedValuesIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor25executeRequest_getCounterIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor31executeRequest_getRegexCountersIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor26executeRequest_getCountersIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor31executeRequest_getStatusDetailsIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor25executeRequest_getVersionIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor22executeRequest_getNameIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor24executeRequest_getStatusIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor40executeRequest_getSelectedExportedValuesIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor34executeRequest_getSelectedCountersIN6apache6thrift20BinaryProtocolReaderENS5_20BinaryProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor40executeRequest_getSelectedExportedValuesIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZN8facebook5fb3034cpp225BaseServiceAsyncProcessor34executeRequest_getSelectedCountersIN6apache6thrift21CompactProtocolReaderENS5_21CompactProtocolWriterEEEvONS5_13ServerRequestE in BaseService.cpp.o
      __ZTHN6apache6thrift15ServerInterface14requestParams_E$non_lazy_ptr in BaseService.cpp.o
     (maybe you meant: __ZTHN6apache6thrift15ServerInterface14requestParams_E$non_lazy_ptr)
ld: symbol(s) not found
collect2: error: ld returned 1 exit status
make[2]: *** [fb303/thrift/libfb303_thrift_cpp.1.0.0.dylib] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCRosettaPorts_devel_fb303/fb303/work/build'
make[1]: *** [fb303/thrift/CMakeFiles/fb303_thrift_cpp.dir/all] Error 2

Any suggestion what can be going wrong?

I know old systems are not supported, so I do not expect a fix, just suggestions what to try.
My build is on 10.6.8 for ppc32 using GCC 12.2.0 and Cmake 3.24.1.

building fails with folly

When compiling fb303 for latest openr build, build fails:

/usr/bin/ccache /usr/bin/c++  -DFMT_LOCALE -DGFLAGS_IS_A_DLL=0 -I/tmp/fbcode_builder_getdeps-ZhomeZtesterZfbopenrZbuildZfbcode_builder-root/repos/github.com-facebookincubator-fb303.git -I. -isystem /opt/facebook/gflags-pFtnO7FGNohWj2trXxCs1LJfTIHedZ2PK7-kG1OaSXE/include -isystem /opt/facebook/glog-R44LrGPBZ5Ekev3frpigEm9bl9nhgX5MwHVbIcKZDg0/include -isystem /opt/facebook/boost-7LpWNokbp7fffjv2w4hlkWWkwII6NJnUz1J5Mz-Bn6o/include -isystem /opt/facebook/double-conversion-NqKE7AnVid4b3W43A8WK4LjVfw0xFTLqUuHrTl0NFLo/include -isystem /opt/facebook/libevent-44TH0t7Nx1sKPHl68UnriEFhcTq0gOnPP1uj7eAK_Cs/include -isystem /opt/facebook/lz4-uHW3b2jq-6sYkhgHWIC5uOF5J-XvWPpVHKisDg3mybY/include -isystem /opt/facebook/zstd-R8qk54ynfKeMcTBOFbW_88TkyeP8_p31qHsrtS6PbjI/include -isystem /opt/facebook/snappy-RehFr1x9aaDGhVdf2Q0avturNagBDfDfo0XDikBq65U/include -isystem /opt/facebook/folly/include -isystem /opt/facebook/fmt-jbgZWgl9ZeHgzeb9I0aQv1Fl9vV25X4rqSmUr9iebPk/include -isystem /opt/facebook/fbthrift/include -isystem /opt/facebook/wangle/include -isystem /opt/facebook/fizz/include -isystem /opt/facebook/libsodium-dpxdMUeC3ZP7pYLJR5GciWzcq2i0SX9szlzDD0SU2zE/include -O2 -g -DNDEBUG -fPIC   -std=c++17 -MD -MT CMakeFiles/fb303.dir/fb303/detail/QuantileStatWrappers.cpp.o -MF CMakeFiles/fb303.dir/fb303/detail/QuantileStatWrappers.cpp.o.d -o CMakeFiles/fb303.dir/fb303/detail/QuantileStatWrappers.cpp.o -c /tmp/fbcode_builder_getdeps-ZhomeZtesterZfbopenrZbuildZfbcode_builder-root/repos/github.com-facebookincubator-fb303.git/fb303/detail/QuantileStatWrappers.cpp
In file included from /tmp/fbcode_builder_getdeps-ZhomeZtesterZfbopenrZbuildZfbcode_builder-root/repos/github.com-facebookincubator-fb303.git/fb303/detail/QuantileStatWrappers.h:109,
                 from /tmp/fbcode_builder_getdeps-ZhomeZtesterZfbopenrZbuildZfbcode_builder-root/repos/github.com-facebookincubator-fb303.git/fb303/detail/QuantileStatWrappers.cpp:18:
/tmp/fbcode_builder_getdeps-ZhomeZtesterZfbopenrZbuildZfbcode_builder-root/repos/github.com-facebookincubator-fb303.git/fb303/detail/QuantileStatWrappers-inl.h: In member function ‘void facebook::fb303::detail::DynamicQuantileStatWrapper<N>::addValue(double, std::chrono::_V2::steady_clock::time_point, Args&& ...)’:
/tmp/fbcode_builder_getdeps-ZhomeZtesterZfbopenrZbuildZfbcode_builder-root/repos/github.com-facebookincubator-fb303.git/fb303/detail/QuantileStatWrappers-inl.h:60:37: error: ‘make_hazard_pointer’ is not a member of ‘folly’
   folly::hazptr_holder<> h = folly::make_hazard_pointer<>();
                                     ^~~~~~~~~~~~~~~~~~~
/tmp/fbcode_builder_getdeps-ZhomeZtesterZfbopenrZbuildZfbcode_builder-root/repos/github.com-facebookincubator-fb303.git/fb303/detail/QuantileStatWrappers-inl.h:60:57: error: expected primary-expression before ‘>’ token
   folly::hazptr_holder<> h = folly::make_hazard_pointer<>();
                                                         ^
                                                         

Usage was introduced, but function not declared in open sourced folly

commit 1f2d757b0a9511fe9cf7f8734c0d86e5451c3d52
Author: Maged Michael <[email protected]>
Date:   Thu May 27 19:57:52 2021 -0700

    hazptr: Change hazard pointer construction to be consistent with WG21 P1121

    Summary:
    Change the constructors for hazptr_holder and add the function make_hazard_pointer to be consistent with [WG21 P1121](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1121r3.pdf).


diff --git a/fb303/detail/QuantileStatWrappers-inl.h b/fb303/detail/QuantileStatWrappers-inl.h
index 77314b22..bc16cb4e 100644
--- a/fb303/detail/QuantileStatWrappers-inl.h
+++ b/fb303/detail/QuantileStatWrappers-inl.h
@@ -57,7 +57,7 @@ void DynamicQuantileStatWrapper<N>::addValue(
     Args&&... subkeys) {
   const SubkeyArray subkeyArray{{std::forward<Args>(subkeys)...}};

-  folly::hazptr_holder<> h;
+  folly::hazptr_holder<> h = folly::make_hazard_pointer<>();
   auto mapPtr = h.protect(stats_);

Doesn't configure when fbthrift isn't built with python

-- Configuring done
CMake Error at build/fbcode_builder/CMake/FBPythonBinary.cmake:494 (add_dependencies):
  The dependency target "FBThrift::thrift_py.py_lib" of target
  "fb303_thrift_py.py_sources_built" does not exist.
Call Stack (most recent call first):
  build/fbcode_builder/CMake/FBThriftPyLibrary.cmake:104 (add_fb_python_library)
  build/fbcode_builder/CMake/FBThriftLibrary.cmake:63 (add_fbthrift_py_library)
  fb303/thrift/CMakeLists.txt:15 (add_fbthrift_library)

Could you please add a cmake option to turn the python support on/off?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.