From 55ba09ec97d2449b39d7fcc38c346969168d899b Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Mon, 27 Feb 2023 10:27:52 +0100 Subject: execution service: implement WaitExecution and google::longrunning::Operations::GetOperation For each action that is executed, an entry is added to a shared thread safe cache. Once the number of operations stored exceeds twice 2^n, where n is given by the option --log-operations-threshold, at most 2^n operations will be removed, in a FIFO scheme. --- .../execution_api/execution_service/TARGETS | 26 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'src/buildtool/execution_api/execution_service/TARGETS') diff --git a/src/buildtool/execution_api/execution_service/TARGETS b/src/buildtool/execution_api/execution_service/TARGETS index 968eb012..739e32e2 100644 --- a/src/buildtool/execution_api/execution_service/TARGETS +++ b/src/buildtool/execution_api/execution_service/TARGETS @@ -14,9 +14,10 @@ [ ["@", "fmt", "", "fmt"] , ["@", "gsl-lite", "", "gsl-lite"] , ["src/buildtool/execution_api/local", "garbage_collector"] - , ["src/buildtool/compatibility", "compatibility"] , ["src/buildtool/file_system", "file_system_manager"] + , "operation_cache" ] + , "private-ldflags": ["-pthread"] } , "ac_server": { "type": ["@", "rules", "CC", "library"] @@ -31,9 +32,7 @@ , ["src/buildtool/common", "bazel_types"] ] , "private-deps": - [ ["src/buildtool/execution_api/local", "garbage_collector"] - , ["src/buildtool/compatibility", "compatibility"] - ] + [["src/buildtool/execution_api/local", "garbage_collector"]] } , "cas_server": { "type": ["@", "rules", "CC", "library"] @@ -65,6 +64,7 @@ , "cas_server" , "bytestream_server" , "capabilities_server" + , "operations_server" , ["src/buildtool/execution_api/remote", "config"] , ["src/buildtool/auth", "auth"] , ["@", "json", "", "json"] @@ -105,4 +105,22 @@ , ["src/buildtool/compatibility", "compatibility"] ] } +, "operation_cache": + { "type": ["@", "rules", "CC", "library"] + , "name": ["operation_cache"] + , "hdrs": ["operation_cache.hpp"] + , "srcs": ["operation_cache.cpp"] + , "deps": [["src/buildtool/logging", "logging"]] + , "stage": ["src", "buildtool", "execution_api", "execution_service"] + , "proto": [["@", "googleapis", "", "google_longrunning_operations_proto"]] + } +, "operations_server": + { "type": ["@", "rules", "CC", "library"] + , "name": ["operations_server"] + , "hdrs": ["operations_server.hpp"] + , "srcs": ["operations_server.cpp"] + , "deps": [["src/buildtool/logging", "logging"], "operation_cache"] + , "proto": [["@", "googleapis", "", "google_longrunning_operations_proto"]] + , "stage": ["src", "buildtool", "execution_api", "execution_service"] + } } -- cgit v1.2.3