From 75bba206221cb6a3595cb5f7ba75108964c19138 Mon Sep 17 00:00:00 2001 From: Sumeet Chhetri Date: Sat, 10 Apr 2021 12:47:34 +0530 Subject: [PATCH] Fixed issues in Cache initialization routes with async libpq modes Server should start listening to requests only when both cache/database init routines are complete [docker_compare][skip_build] --- .cproject | 11 +- .github/workflows/ci-docker-tfb-test.yml | 2 +- .github/workflows/ci-macos.yml | 16 +-- CMakeLists.txt | 1 + docker/benchmark_compare.json | 18 --- ...raw-async-clibpqb-profiled-base.dockerfile | 10 +- ...cpp-sql-raw-async-profiled-base.dockerfile | 5 +- ...p-sql-raw-clibpqb-profiled-base.dockerfile | 5 +- ...ffead-cpp-sql-raw-profiled-base.dockerfile | 5 +- docker/techempower-config/run_ffead.sh | 4 - .../sql-async-profiled-install-clang-dbg.sh | 42 +------ .../sql-async-profiled-install-clang.sh | 41 ------- .../sql-async-profiled-install.sh | 38 ------ .../sql-profiled-install-clang.sh | 40 ------- .../sql-profiled-install.sh | 38 ------ .../techempower-config/sql-profiled-util.sh | 54 +++++++++ src/framework/ConfigurationHandler.cpp | 6 +- src/framework/DCPGenerator.cpp | 2 +- src/framework/ServiceTask.cpp | 4 +- src/framework/TemplateGenerator.cpp | 2 +- src/modules/cache/CacheInterface.h | 2 +- src/modules/cache/CacheManager.cpp | 26 +++++ src/modules/cache/CacheManager.h | 3 + src/modules/cache/memcached/MemcachedImpl.cpp | 2 +- src/modules/cache/memcached/MemcachedImpl.h | 2 +- src/modules/cache/memory/MemoryCacheImpl.cpp | 2 +- src/modules/cache/memory/MemoryCacheImpl.h | 2 +- src/modules/cache/redis/RedisCacheImpl.cpp | 5 +- src/modules/cache/redis/RedisCacheImpl.h | 2 +- src/modules/common/AppDefines.xmake.h.in | 90 ++++++++++++++ src/modules/common/Compatibility.cpp | 6 + src/modules/common/Compatibility.h | 4 + src/modules/common/Logger.cpp | 18 +-- src/modules/common/Logger.h | 12 +- src/modules/http/HttpResponse.cpp | 2 +- src/modules/http/HttpSession.cpp | 2 +- src/modules/ioc/FFEADContext.cpp | 4 +- src/modules/sdorm/DataSourceManager.cpp | 26 +++++ src/modules/sdorm/DataSourceManager.h | 3 + .../sdorm/sql/libpq/LibpqDataSourceImpl.cpp | 110 +++++++++++------- .../sdorm/sql/libpq/LibpqDataSourceImpl.h | 4 +- src/modules/server-util/NBServer.cpp | 2 +- .../server-util/RequestReaderHandler.cpp | 26 ++++- .../server-util/RequestReaderHandler.h | 3 +- src/modules/server-util/SelEpolKqEvPrt.cpp | 11 +- src/modules/server-util/SelEpolKqEvPrt.h | 2 +- src/modules/server-util/SocketInterface.h | 2 +- src/server/embedded/CHServer.cpp | 60 +++++----- src/server/embedded/CHServer.h | 3 + web/te-benchmark-um-mgr/src/TeBkUmMgr.cpp | 1 + .../include/TeBkUmLpqAsync.h | 5 +- .../src/TeBkUmLpqAsync.cpp | 10 +- web/te-benchmark-um-pq/src/TeBkUmLpq.cpp | 1 + web/te-benchmark-um/src/TeBkUm.cpp | 1 + web/te-benchmark/src/TeBkRestController.cpp | 1 + 55 files changed, 429 insertions(+), 370 deletions(-) create mode 100644 docker/techempower-config/sql-profiled-util.sh create mode 100644 src/modules/common/AppDefines.xmake.h.in diff --git a/.cproject b/.cproject index 532659e65..86b964e0b 100644 --- a/.cproject +++ b/.cproject @@ -42,6 +42,7 @@