diff --git a/indexify/src/indexify/proto/executor_api.proto b/indexify/src/indexify/proto/executor_api.proto index b5092a050..418d4e8c2 100644 --- a/indexify/src/indexify/proto/executor_api.proto +++ b/indexify/src/indexify/proto/executor_api.proto @@ -255,10 +255,10 @@ message FunctionCallResult { message DesiredExecutorState { repeated FunctionExecutorDescription function_executors = 1; repeated Allocation allocations = 2; - repeated FunctionCallResult function_call_results = 3; // Server supplied clock value used to deduplicate messages. Executor records max clock value // it observed and ignores all the messages with clock value <= the max observed value. - optional uint64 clock = 4; + optional uint64 clock = 3; + repeated FunctionCallResult function_call_results = 4; } enum AllocationOutcomeCode { diff --git a/indexify/src/indexify/proto/executor_api_pb2.py b/indexify/src/indexify/proto/executor_api_pb2.py index 9501a6797..62dba5bb4 100644 --- a/indexify/src/indexify/proto/executor_api_pb2.py +++ b/indexify/src/indexify/proto/executor_api_pb2.py @@ -21,7 +21,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n!indexify/proto/executor_api.proto\x12\x0f\x65xecutor_api_pb\x1a\x1fgoogle/protobuf/timestamp.proto"\xbf\x03\n\x0b\x44\x61taPayload\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12;\n\x08\x65ncoding\x18\x02 \x01(\x0e\x32$.executor_api_pb.DataPayloadEncodingH\x01\x88\x01\x01\x12\x1d\n\x10\x65ncoding_version\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x19\n\x0c\x63ontent_type\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rmetadata_size\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x13\n\x06offset\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x11\n\x04size\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x18\n\x0bsha256_hash\x18\x08 \x01(\tH\x07\x88\x01\x01\x12$\n\x17source_function_call_id\x18\t \x01(\tH\x08\x88\x01\x01\x12\x0f\n\x02id\x18\n \x01(\tH\t\x88\x01\x01\x42\x06\n\x04_uriB\x0b\n\t_encodingB\x13\n\x11_encoding_versionB\x0f\n\r_content_typeB\x10\n\x0e_metadata_sizeB\t\n\x07_offsetB\x07\n\x05_sizeB\x0e\n\x0c_sha256_hashB\x1a\n\x18_source_function_call_idB\x05\n\x03_id"e\n\x0cGPUResources\x12\x12\n\x05\x63ount\x18\x01 \x01(\rH\x00\x88\x01\x01\x12-\n\x05model\x18\x02 \x01(\x0e\x32\x19.executor_api_pb.GPUModelH\x01\x88\x01\x01\x42\x08\n\x06_countB\x08\n\x06_model"\xc2\x01\n\rHostResources\x12\x16\n\tcpu_count\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x17\n\ndisk_bytes\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12/\n\x03gpu\x18\x04 \x01(\x0b\x32\x1d.executor_api_pb.GPUResourcesH\x03\x88\x01\x01\x42\x0c\n\n_cpu_countB\x0f\n\r_memory_bytesB\r\n\x0b_disk_bytesB\x06\n\x04_gpu"\xd3\x01\n\x0f\x41llowedFunction\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10\x61pplication_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x61pplication_version\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x0c\n\n_namespaceB\x13\n\x11_application_nameB\x10\n\x0e_function_nameB\x16\n\x14_application_version"\xd8\x01\n\x19\x46unctionExecutorResources\x12\x1b\n\x0e\x63pu_ms_per_sec\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x17\n\ndisk_bytes\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12/\n\x03gpu\x18\x04 \x01(\x0b\x32\x1d.executor_api_pb.GPUResourcesH\x03\x88\x01\x01\x42\x11\n\x0f_cpu_ms_per_secB\x0f\n\r_memory_bytesB\r\n\x0b_disk_bytesB\x06\n\x04_gpu"\xcf\x01\n\x0b\x46unctionRef\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10\x61pplication_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x61pplication_version\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x0c\n\n_namespaceB\x13\n\x11_application_nameB\x10\n\x0e_function_nameB\x16\n\x14_application_version"\xa3\x04\n\x1b\x46unctionExecutorDescription\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x33\n\x08\x66unction\x18\x02 \x01(\x0b\x32\x1c.executor_api_pb.FunctionRefH\x01\x88\x01\x01\x12\x14\n\x0csecret_names\x18\x03 \x03(\t\x12&\n\x19initialization_timeout_ms\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x36\n\x0b\x61pplication\x18\x05 \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x03\x88\x01\x01\x12\x42\n\tresources\x18\x06 \x01(\x0b\x32*.executor_api_pb.FunctionExecutorResourcesH\x04\x88\x01\x01\x12&\n\x19output_payload_uri_prefix\x18\x07 \x01(\tH\x05\x88\x01\x01\x12\x1c\n\x0fmax_concurrency\x18\x08 \x01(\rH\x06\x88\x01\x01\x12"\n\x15\x61llocation_timeout_ms\x18\t \x01(\rH\x07\x88\x01\x01\x42\x05\n\x03_idB\x0b\n\t_functionB\x1c\n\x1a_initialization_timeout_msB\x0e\n\x0c_applicationB\x0c\n\n_resourcesB\x1c\n\x1a_output_payload_uri_prefixB\x12\n\x10_max_concurrencyB\x18\n\x16_allocation_timeout_ms"\xcf\x02\n\x15\x46unctionExecutorState\x12\x46\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32,.executor_api_pb.FunctionExecutorDescriptionH\x00\x88\x01\x01\x12<\n\x06status\x18\x02 \x01(\x0e\x32\'.executor_api_pb.FunctionExecutorStatusH\x01\x88\x01\x01\x12S\n\x12termination_reason\x18\x03 \x01(\x0e\x32\x32.executor_api_pb.FunctionExecutorTerminationReasonH\x02\x88\x01\x01\x12)\n!allocation_ids_caused_termination\x18\x04 \x03(\tB\x0e\n\x0c_descriptionB\t\n\x07_statusB\x15\n\x13_termination_reason"\xce\x05\n\rExecutorState\x12\x18\n\x0b\x65xecutor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08hostname\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07version\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x34\n\x06status\x18\x06 \x01(\x0e\x32\x1f.executor_api_pb.ExecutorStatusH\x03\x88\x01\x01\x12<\n\x0ftotal_resources\x18\r \x01(\x0b\x32\x1e.executor_api_pb.HostResourcesH\x04\x88\x01\x01\x12N\n!total_function_executor_resources\x18\x07 \x01(\x0b\x32\x1e.executor_api_pb.HostResourcesH\x05\x88\x01\x01\x12;\n\x11\x61llowed_functions\x18\x08 \x03(\x0b\x32 .executor_api_pb.AllowedFunction\x12H\n\x18\x66unction_executor_states\x18\t \x03(\x0b\x32&.executor_api_pb.FunctionExecutorState\x12:\n\x06labels\x18\n \x03(\x0b\x32*.executor_api_pb.ExecutorState.LabelsEntry\x12\x17\n\nstate_hash\x18\x0b \x01(\tH\x06\x88\x01\x01\x12\x19\n\x0cserver_clock\x18\x0c \x01(\x04H\x07\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_executor_idB\x0b\n\t_hostnameB\n\n\x08_versionB\t\n\x07_statusB\x12\n\x10_total_resourcesB$\n"_total_function_executor_resourcesB\r\n\x0b_state_hashB\x0f\n\r_server_clock"y\n\x0e\x45xecutorUpdate\x12\x18\n\x0b\x65xecutor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12=\n\x12\x61llocation_results\x18\x02 \x03(\x0b\x32!.executor_api_pb.AllocationResultB\x0e\n\x0c_executor_id"\xbf\x01\n\x11\x46unctionCallWatch\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x61pplication\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nrequest_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x10\x66unction_call_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x0c\n\n_namespaceB\x0e\n\x0c_applicationB\r\n\x0b_request_idB\x13\n\x11_function_call_id"\x82\x02\n\x1aReportExecutorStateRequest\x12;\n\x0e\x65xecutor_state\x18\x01 \x01(\x0b\x32\x1e.executor_api_pb.ExecutorStateH\x00\x88\x01\x01\x12=\n\x0f\x65xecutor_update\x18\x02 \x01(\x0b\x32\x1f.executor_api_pb.ExecutorUpdateH\x01\x88\x01\x01\x12\x41\n\x15\x66unction_call_watches\x18\x03 \x03(\x0b\x32".executor_api_pb.FunctionCallWatchB\x11\n\x0f_executor_stateB\x12\n\x10_executor_update"\x1d\n\x1bReportExecutorStateResponse"\x9a\x04\n\nAllocation\x12\x33\n\x08\x66unction\x18\x01 \x01(\x0b\x32\x1c.executor_api_pb.FunctionRefH\x00\x88\x01\x01\x12\x1a\n\rallocation_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x66unction_call_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nrequest_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x12*\n\x04\x61rgs\x18\x05 \x03(\x0b\x32\x1c.executor_api_pb.DataPayload\x12&\n\x19output_payload_uri_prefix\x18\x06 \x01(\tH\x04\x88\x01\x01\x12-\n request_error_payload_uri_prefix\x18\x07 \x01(\tH\x05\x88\x01\x01\x12!\n\x14\x66unction_executor_id\x18\x08 \x01(\tH\x06\x88\x01\x01\x12#\n\x16\x66unction_call_metadata\x18\t \x01(\x0cH\x07\x88\x01\x01\x42\x0b\n\t_functionB\x10\n\x0e_allocation_idB\x13\n\x11_function_call_idB\r\n\x0b_request_idB\x1c\n\x1a_output_payload_uri_prefixB#\n!_request_error_payload_uri_prefixB\x17\n\x15_function_executor_idB\x19\n\x17_function_call_metadata"K\n\x1fGetDesiredExecutorStatesRequest\x12\x18\n\x0b\x65xecutor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_executor_id"\xda\x03\n\x12\x46unctionCallResult\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nrequest_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x66unction_call_id\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x41\n\x0coutcome_code\x18\x05 \x01(\x0e\x32&.executor_api_pb.AllocationOutcomeCodeH\x03\x88\x01\x01\x12\x45\n\x0e\x66\x61ilure_reason\x18\x06 \x01(\x0e\x32(.executor_api_pb.AllocationFailureReasonH\x04\x88\x01\x01\x12\x37\n\x0creturn_value\x18\x07 \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x05\x88\x01\x01\x12\x38\n\rrequest_error\x18\t \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x06\x88\x01\x01\x42\x0c\n\n_namespaceB\r\n\x0b_request_idB\x13\n\x11_function_call_idB\x0f\n\r_outcome_codeB\x11\n\x0f_failure_reasonB\x0f\n\r_return_valueB\x10\n\x0e_request_error"\xf4\x01\n\x14\x44\x65siredExecutorState\x12H\n\x12\x66unction_executors\x18\x01 \x03(\x0b\x32,.executor_api_pb.FunctionExecutorDescription\x12\x30\n\x0b\x61llocations\x18\x02 \x03(\x0b\x32\x1b.executor_api_pb.Allocation\x12\x42\n\x15\x66unction_call_results\x18\x03 \x03(\x0b\x32#.executor_api_pb.FunctionCallResult\x12\x12\n\x05\x63lock\x18\x04 \x01(\x04H\x00\x88\x01\x01\x42\x08\n\x06_clock"\x80\x01\n\x13\x45xecutionPlanUpdate\x12\x36\n\rfunction_call\x18\n \x01(\x0b\x32\x1d.executor_api_pb.FunctionCallH\x00\x12+\n\x06reduce\x18\x0c \x01(\x0b\x32\x19.executor_api_pb.ReduceOpH\x00\x42\x04\n\x02op"\xbe\x01\n\x0c\x46unctionCall\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x06target\x18\x02 \x01(\x0b\x32\x1c.executor_api_pb.FunctionRefH\x01\x88\x01\x01\x12*\n\x04\x61rgs\x18\x03 \x03(\x0b\x32\x1c.executor_api_pb.FunctionArg\x12\x1a\n\rcall_metadata\x18\x05 \x01(\x0cH\x02\x88\x01\x01\x42\x05\n\x03_idB\t\n\x07_targetB\x10\n\x0e_call_metadata"h\n\x0b\x46unctionArg\x12\x1a\n\x10\x66unction_call_id\x18\x01 \x01(\tH\x00\x12\x33\n\x0binline_data\x18\x02 \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x00\x42\x08\n\x06source"\xc2\x01\n\x08ReduceOp\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x30\n\ncollection\x18\x02 \x03(\x0b\x32\x1c.executor_api_pb.FunctionArg\x12\x32\n\x07reducer\x18\x03 \x01(\x0b\x32\x1c.executor_api_pb.FunctionRefH\x01\x88\x01\x01\x12\x1a\n\rcall_metadata\x18\x04 \x01(\x0cH\x02\x88\x01\x01\x42\x05\n\x03_idB\n\n\x08_reducerB\x10\n\x0e_call_metadata"\xcb\x01\n\x14\x45xecutionPlanUpdates\x12\x35\n\x07updates\x18\x01 \x03(\x0b\x32$.executor_api_pb.ExecutionPlanUpdate\x12"\n\x15root_function_call_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x08start_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x42\x18\n\x16_root_function_call_idB\x0b\n\t_start_at"\x8f\x05\n\x10\x41llocationResult\x12\x33\n\x08\x66unction\x18\x01 \x01(\x0b\x32\x1c.executor_api_pb.FunctionRefH\x01\x88\x01\x01\x12\x1a\n\rallocation_id\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x10\x66unction_call_id\x18\x03 \x01(\tH\x03\x88\x01\x01\x12\x17\n\nrequest_id\x18\x04 \x01(\tH\x04\x88\x01\x01\x12\x41\n\x0coutcome_code\x18\x05 \x01(\x0e\x32&.executor_api_pb.AllocationOutcomeCodeH\x05\x88\x01\x01\x12\x45\n\x0e\x66\x61ilure_reason\x18\x06 \x01(\x0e\x32(.executor_api_pb.AllocationFailureReasonH\x06\x88\x01\x01\x12-\n\x05value\x18\x07 \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x00\x12\x38\n\x07updates\x18\x08 \x01(\x0b\x32%.executor_api_pb.ExecutionPlanUpdatesH\x00\x12\x38\n\rrequest_error\x18\t \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x07\x88\x01\x01\x12"\n\x15\x65xecution_duration_ms\x18\n \x01(\x04H\x08\x88\x01\x01\x42\x0e\n\x0creturn_valueB\x0b\n\t_functionB\x10\n\x0e_allocation_idB\x13\n\x11_function_call_idB\r\n\x0b_request_idB\x0f\n\r_outcome_codeB\x11\n\x0f_failure_reasonB\x10\n\x0e_request_errorB\x18\n\x16_execution_duration_ms"\x98\x02\n\x13\x46unctionCallRequest\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x61pplication\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nrequest_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12;\n\x07updates\x18\x04 \x01(\x0b\x32%.executor_api_pb.ExecutionPlanUpdatesH\x03\x88\x01\x01\x12$\n\x17source_function_call_id\x18\x06 \x01(\tH\x04\x88\x01\x01\x42\x0c\n\n_namespaceB\x0e\n\x0c_applicationB\r\n\x0b_request_idB\n\n\x08_updatesB\x1a\n\x18_source_function_call_id"\x16\n\x14\x46unctionCallResponse*\xf0\x01\n\x13\x44\x61taPayloadEncoding\x12!\n\x1d\x44\x41TA_PAYLOAD_ENCODING_UNKNOWN\x10\x00\x12#\n\x1f\x44\x41TA_PAYLOAD_ENCODING_UTF8_JSON\x10\x01\x12#\n\x1f\x44\x41TA_PAYLOAD_ENCODING_UTF8_TEXT\x10\x02\x12\'\n#DATA_PAYLOAD_ENCODING_BINARY_PICKLE\x10\x03\x12$\n DATA_PAYLOAD_ENCODING_BINARY_ZIP\x10\x04\x12\x1d\n\x19\x44\x41TA_PAYLOAD_ENCODING_RAW\x10\x05*\xd6\x01\n\x08GPUModel\x12\x15\n\x11GPU_MODEL_UNKNOWN\x10\x00\x12\x1e\n\x1aGPU_MODEL_NVIDIA_A100_40GB\x10\x01\x12\x1e\n\x1aGPU_MODEL_NVIDIA_A100_80GB\x10\x02\x12\x1e\n\x1aGPU_MODEL_NVIDIA_H100_80GB\x10\x03\x12\x1d\n\x19GPU_MODEL_NVIDIA_TESLA_T4\x10\x04\x12\x1a\n\x16GPU_MODEL_NVIDIA_A6000\x10\x05\x12\x18\n\x14GPU_MODEL_NVIDIA_A10\x10\x06*\xb3\x01\n\x16\x46unctionExecutorStatus\x12$\n FUNCTION_EXECUTOR_STATUS_UNKNOWN\x10\x00\x12$\n FUNCTION_EXECUTOR_STATUS_PENDING\x10\x01\x12$\n FUNCTION_EXECUTOR_STATUS_RUNNING\x10\x02\x12\'\n#FUNCTION_EXECUTOR_STATUS_TERMINATED\x10\x03*\xc2\x04\n!FunctionExecutorTerminationReason\x12\x30\n,FUNCTION_EXECUTOR_TERMINATION_REASON_UNKNOWN\x10\x00\x12\x46\nBFUNCTION_EXECUTOR_TERMINATION_REASON_STARTUP_FAILED_INTERNAL_ERROR\x10\x01\x12\x46\nBFUNCTION_EXECUTOR_TERMINATION_REASON_STARTUP_FAILED_FUNCTION_ERROR\x10\x02\x12H\nDFUNCTION_EXECUTOR_TERMINATION_REASON_STARTUP_FAILED_FUNCTION_TIMEOUT\x10\x03\x12\x32\n.FUNCTION_EXECUTOR_TERMINATION_REASON_UNHEALTHY\x10\x0c\x12\x37\n3FUNCTION_EXECUTOR_TERMINATION_REASON_INTERNAL_ERROR\x10\r\x12\x39\n5FUNCTION_EXECUTOR_TERMINATION_REASON_FUNCTION_TIMEOUT\x10\x0e\x12;\n7FUNCTION_EXECUTOR_TERMINATION_REASON_FUNCTION_CANCELLED\x10\x0f\x12,\n(FUNCTION_EXECUTOR_TERMINATION_REASON_OOM\x10\x10*\xa5\x01\n\x0e\x45xecutorStatus\x12\x1b\n\x17\x45XECUTOR_STATUS_UNKNOWN\x10\x00\x12\x1f\n\x1b\x45XECUTOR_STATUS_STARTING_UP\x10\x01\x12\x1b\n\x17\x45XECUTOR_STATUS_RUNNING\x10\x02\x12\x1b\n\x17\x45XECUTOR_STATUS_DRAINED\x10\x03\x12\x1b\n\x17\x45XECUTOR_STATUS_STOPPED\x10\x04*\x86\x01\n\x15\x41llocationOutcomeCode\x12#\n\x1f\x41LLOCATION_OUTCOME_CODE_UNKNOWN\x10\x00\x12#\n\x1f\x41LLOCATION_OUTCOME_CODE_SUCCESS\x10\x01\x12#\n\x1f\x41LLOCATION_OUTCOME_CODE_FAILURE\x10\x02*\xf4\x03\n\x17\x41llocationFailureReason\x12%\n!ALLOCATION_FAILURE_REASON_UNKNOWN\x10\x00\x12,\n(ALLOCATION_FAILURE_REASON_INTERNAL_ERROR\x10\x01\x12,\n(ALLOCATION_FAILURE_REASON_FUNCTION_ERROR\x10\x02\x12.\n*ALLOCATION_FAILURE_REASON_FUNCTION_TIMEOUT\x10\x03\x12+\n\'ALLOCATION_FAILURE_REASON_REQUEST_ERROR\x10\x04\x12\x32\n.ALLOCATION_FAILURE_REASON_ALLOCATION_CANCELLED\x10\x05\x12:\n6ALLOCATION_FAILURE_REASON_FUNCTION_EXECUTOR_TERMINATED\x10\x06\x12!\n\x1d\x41LLOCATION_FAILURE_REASON_OOM\x10\x07\x12\x36\n2ALLOCATION_FAILURE_REASON_CONSTRAINT_UNSATISFIABLE\x10\x08\x12.\n*ALLOCATION_FAILURE_REASON_EXECUTOR_REMOVED\x10\t2\xdf\x02\n\x0b\x45xecutorAPI\x12t\n\x15report_executor_state\x12+.executor_api_pb.ReportExecutorStateRequest\x1a,.executor_api_pb.ReportExecutorStateResponse"\x00\x12z\n\x1bget_desired_executor_states\x12\x30.executor_api_pb.GetDesiredExecutorStatesRequest\x1a%.executor_api_pb.DesiredExecutorState"\x00\x30\x01\x12^\n\rcall_function\x12$.executor_api_pb.FunctionCallRequest\x1a%.executor_api_pb.FunctionCallResponse"\x00\x62\x06proto3' + b'\n!indexify/proto/executor_api.proto\x12\x0f\x65xecutor_api_pb\x1a\x1fgoogle/protobuf/timestamp.proto"\xbf\x03\n\x0b\x44\x61taPayload\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12;\n\x08\x65ncoding\x18\x02 \x01(\x0e\x32$.executor_api_pb.DataPayloadEncodingH\x01\x88\x01\x01\x12\x1d\n\x10\x65ncoding_version\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x19\n\x0c\x63ontent_type\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rmetadata_size\x18\x05 \x01(\x04H\x04\x88\x01\x01\x12\x13\n\x06offset\x18\x06 \x01(\x04H\x05\x88\x01\x01\x12\x11\n\x04size\x18\x07 \x01(\x04H\x06\x88\x01\x01\x12\x18\n\x0bsha256_hash\x18\x08 \x01(\tH\x07\x88\x01\x01\x12$\n\x17source_function_call_id\x18\t \x01(\tH\x08\x88\x01\x01\x12\x0f\n\x02id\x18\n \x01(\tH\t\x88\x01\x01\x42\x06\n\x04_uriB\x0b\n\t_encodingB\x13\n\x11_encoding_versionB\x0f\n\r_content_typeB\x10\n\x0e_metadata_sizeB\t\n\x07_offsetB\x07\n\x05_sizeB\x0e\n\x0c_sha256_hashB\x1a\n\x18_source_function_call_idB\x05\n\x03_id"e\n\x0cGPUResources\x12\x12\n\x05\x63ount\x18\x01 \x01(\rH\x00\x88\x01\x01\x12-\n\x05model\x18\x02 \x01(\x0e\x32\x19.executor_api_pb.GPUModelH\x01\x88\x01\x01\x42\x08\n\x06_countB\x08\n\x06_model"\xc2\x01\n\rHostResources\x12\x16\n\tcpu_count\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x17\n\ndisk_bytes\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12/\n\x03gpu\x18\x04 \x01(\x0b\x32\x1d.executor_api_pb.GPUResourcesH\x03\x88\x01\x01\x42\x0c\n\n_cpu_countB\x0f\n\r_memory_bytesB\r\n\x0b_disk_bytesB\x06\n\x04_gpu"\xd3\x01\n\x0f\x41llowedFunction\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10\x61pplication_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x61pplication_version\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x0c\n\n_namespaceB\x13\n\x11_application_nameB\x10\n\x0e_function_nameB\x16\n\x14_application_version"\xd8\x01\n\x19\x46unctionExecutorResources\x12\x1b\n\x0e\x63pu_ms_per_sec\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x17\n\ndisk_bytes\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12/\n\x03gpu\x18\x04 \x01(\x0b\x32\x1d.executor_api_pb.GPUResourcesH\x03\x88\x01\x01\x42\x11\n\x0f_cpu_ms_per_secB\x0f\n\r_memory_bytesB\r\n\x0b_disk_bytesB\x06\n\x04_gpu"\xcf\x01\n\x0b\x46unctionRef\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10\x61pplication_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x61pplication_version\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x0c\n\n_namespaceB\x13\n\x11_application_nameB\x10\n\x0e_function_nameB\x16\n\x14_application_version"\xa3\x04\n\x1b\x46unctionExecutorDescription\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x33\n\x08\x66unction\x18\x02 \x01(\x0b\x32\x1c.executor_api_pb.FunctionRefH\x01\x88\x01\x01\x12\x14\n\x0csecret_names\x18\x03 \x03(\t\x12&\n\x19initialization_timeout_ms\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x36\n\x0b\x61pplication\x18\x05 \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x03\x88\x01\x01\x12\x42\n\tresources\x18\x06 \x01(\x0b\x32*.executor_api_pb.FunctionExecutorResourcesH\x04\x88\x01\x01\x12&\n\x19output_payload_uri_prefix\x18\x07 \x01(\tH\x05\x88\x01\x01\x12\x1c\n\x0fmax_concurrency\x18\x08 \x01(\rH\x06\x88\x01\x01\x12"\n\x15\x61llocation_timeout_ms\x18\t \x01(\rH\x07\x88\x01\x01\x42\x05\n\x03_idB\x0b\n\t_functionB\x1c\n\x1a_initialization_timeout_msB\x0e\n\x0c_applicationB\x0c\n\n_resourcesB\x1c\n\x1a_output_payload_uri_prefixB\x12\n\x10_max_concurrencyB\x18\n\x16_allocation_timeout_ms"\xcf\x02\n\x15\x46unctionExecutorState\x12\x46\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32,.executor_api_pb.FunctionExecutorDescriptionH\x00\x88\x01\x01\x12<\n\x06status\x18\x02 \x01(\x0e\x32\'.executor_api_pb.FunctionExecutorStatusH\x01\x88\x01\x01\x12S\n\x12termination_reason\x18\x03 \x01(\x0e\x32\x32.executor_api_pb.FunctionExecutorTerminationReasonH\x02\x88\x01\x01\x12)\n!allocation_ids_caused_termination\x18\x04 \x03(\tB\x0e\n\x0c_descriptionB\t\n\x07_statusB\x15\n\x13_termination_reason"\xce\x05\n\rExecutorState\x12\x18\n\x0b\x65xecutor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08hostname\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07version\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x34\n\x06status\x18\x06 \x01(\x0e\x32\x1f.executor_api_pb.ExecutorStatusH\x03\x88\x01\x01\x12<\n\x0ftotal_resources\x18\r \x01(\x0b\x32\x1e.executor_api_pb.HostResourcesH\x04\x88\x01\x01\x12N\n!total_function_executor_resources\x18\x07 \x01(\x0b\x32\x1e.executor_api_pb.HostResourcesH\x05\x88\x01\x01\x12;\n\x11\x61llowed_functions\x18\x08 \x03(\x0b\x32 .executor_api_pb.AllowedFunction\x12H\n\x18\x66unction_executor_states\x18\t \x03(\x0b\x32&.executor_api_pb.FunctionExecutorState\x12:\n\x06labels\x18\n \x03(\x0b\x32*.executor_api_pb.ExecutorState.LabelsEntry\x12\x17\n\nstate_hash\x18\x0b \x01(\tH\x06\x88\x01\x01\x12\x19\n\x0cserver_clock\x18\x0c \x01(\x04H\x07\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0c_executor_idB\x0b\n\t_hostnameB\n\n\x08_versionB\t\n\x07_statusB\x12\n\x10_total_resourcesB$\n"_total_function_executor_resourcesB\r\n\x0b_state_hashB\x0f\n\r_server_clock"y\n\x0e\x45xecutorUpdate\x12\x18\n\x0b\x65xecutor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12=\n\x12\x61llocation_results\x18\x02 \x03(\x0b\x32!.executor_api_pb.AllocationResultB\x0e\n\x0c_executor_id"\xbf\x01\n\x11\x46unctionCallWatch\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x61pplication\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nrequest_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x10\x66unction_call_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x0c\n\n_namespaceB\x0e\n\x0c_applicationB\r\n\x0b_request_idB\x13\n\x11_function_call_id"\x82\x02\n\x1aReportExecutorStateRequest\x12;\n\x0e\x65xecutor_state\x18\x01 \x01(\x0b\x32\x1e.executor_api_pb.ExecutorStateH\x00\x88\x01\x01\x12=\n\x0f\x65xecutor_update\x18\x02 \x01(\x0b\x32\x1f.executor_api_pb.ExecutorUpdateH\x01\x88\x01\x01\x12\x41\n\x15\x66unction_call_watches\x18\x03 \x03(\x0b\x32".executor_api_pb.FunctionCallWatchB\x11\n\x0f_executor_stateB\x12\n\x10_executor_update"\x1d\n\x1bReportExecutorStateResponse"\x9a\x04\n\nAllocation\x12\x33\n\x08\x66unction\x18\x01 \x01(\x0b\x32\x1c.executor_api_pb.FunctionRefH\x00\x88\x01\x01\x12\x1a\n\rallocation_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x66unction_call_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nrequest_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x12*\n\x04\x61rgs\x18\x05 \x03(\x0b\x32\x1c.executor_api_pb.DataPayload\x12&\n\x19output_payload_uri_prefix\x18\x06 \x01(\tH\x04\x88\x01\x01\x12-\n request_error_payload_uri_prefix\x18\x07 \x01(\tH\x05\x88\x01\x01\x12!\n\x14\x66unction_executor_id\x18\x08 \x01(\tH\x06\x88\x01\x01\x12#\n\x16\x66unction_call_metadata\x18\t \x01(\x0cH\x07\x88\x01\x01\x42\x0b\n\t_functionB\x10\n\x0e_allocation_idB\x13\n\x11_function_call_idB\r\n\x0b_request_idB\x1c\n\x1a_output_payload_uri_prefixB#\n!_request_error_payload_uri_prefixB\x17\n\x15_function_executor_idB\x19\n\x17_function_call_metadata"K\n\x1fGetDesiredExecutorStatesRequest\x12\x18\n\x0b\x65xecutor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_executor_id"\xda\x03\n\x12\x46unctionCallResult\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nrequest_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10\x66unction_call_id\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x41\n\x0coutcome_code\x18\x05 \x01(\x0e\x32&.executor_api_pb.AllocationOutcomeCodeH\x03\x88\x01\x01\x12\x45\n\x0e\x66\x61ilure_reason\x18\x06 \x01(\x0e\x32(.executor_api_pb.AllocationFailureReasonH\x04\x88\x01\x01\x12\x37\n\x0creturn_value\x18\x07 \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x05\x88\x01\x01\x12\x38\n\rrequest_error\x18\t \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x06\x88\x01\x01\x42\x0c\n\n_namespaceB\r\n\x0b_request_idB\x13\n\x11_function_call_idB\x0f\n\r_outcome_codeB\x11\n\x0f_failure_reasonB\x0f\n\r_return_valueB\x10\n\x0e_request_error"\xf4\x01\n\x14\x44\x65siredExecutorState\x12H\n\x12\x66unction_executors\x18\x01 \x03(\x0b\x32,.executor_api_pb.FunctionExecutorDescription\x12\x30\n\x0b\x61llocations\x18\x02 \x03(\x0b\x32\x1b.executor_api_pb.Allocation\x12\x12\n\x05\x63lock\x18\x03 \x01(\x04H\x00\x88\x01\x01\x12\x42\n\x15\x66unction_call_results\x18\x04 \x03(\x0b\x32#.executor_api_pb.FunctionCallResultB\x08\n\x06_clock"\x80\x01\n\x13\x45xecutionPlanUpdate\x12\x36\n\rfunction_call\x18\n \x01(\x0b\x32\x1d.executor_api_pb.FunctionCallH\x00\x12+\n\x06reduce\x18\x0c \x01(\x0b\x32\x19.executor_api_pb.ReduceOpH\x00\x42\x04\n\x02op"\xbe\x01\n\x0c\x46unctionCall\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x06target\x18\x02 \x01(\x0b\x32\x1c.executor_api_pb.FunctionRefH\x01\x88\x01\x01\x12*\n\x04\x61rgs\x18\x03 \x03(\x0b\x32\x1c.executor_api_pb.FunctionArg\x12\x1a\n\rcall_metadata\x18\x05 \x01(\x0cH\x02\x88\x01\x01\x42\x05\n\x03_idB\t\n\x07_targetB\x10\n\x0e_call_metadata"h\n\x0b\x46unctionArg\x12\x1a\n\x10\x66unction_call_id\x18\x01 \x01(\tH\x00\x12\x33\n\x0binline_data\x18\x02 \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x00\x42\x08\n\x06source"\xc2\x01\n\x08ReduceOp\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x30\n\ncollection\x18\x02 \x03(\x0b\x32\x1c.executor_api_pb.FunctionArg\x12\x32\n\x07reducer\x18\x03 \x01(\x0b\x32\x1c.executor_api_pb.FunctionRefH\x01\x88\x01\x01\x12\x1a\n\rcall_metadata\x18\x04 \x01(\x0cH\x02\x88\x01\x01\x42\x05\n\x03_idB\n\n\x08_reducerB\x10\n\x0e_call_metadata"\xcb\x01\n\x14\x45xecutionPlanUpdates\x12\x35\n\x07updates\x18\x01 \x03(\x0b\x32$.executor_api_pb.ExecutionPlanUpdate\x12"\n\x15root_function_call_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x08start_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x42\x18\n\x16_root_function_call_idB\x0b\n\t_start_at"\x8f\x05\n\x10\x41llocationResult\x12\x33\n\x08\x66unction\x18\x01 \x01(\x0b\x32\x1c.executor_api_pb.FunctionRefH\x01\x88\x01\x01\x12\x1a\n\rallocation_id\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x10\x66unction_call_id\x18\x03 \x01(\tH\x03\x88\x01\x01\x12\x17\n\nrequest_id\x18\x04 \x01(\tH\x04\x88\x01\x01\x12\x41\n\x0coutcome_code\x18\x05 \x01(\x0e\x32&.executor_api_pb.AllocationOutcomeCodeH\x05\x88\x01\x01\x12\x45\n\x0e\x66\x61ilure_reason\x18\x06 \x01(\x0e\x32(.executor_api_pb.AllocationFailureReasonH\x06\x88\x01\x01\x12-\n\x05value\x18\x07 \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x00\x12\x38\n\x07updates\x18\x08 \x01(\x0b\x32%.executor_api_pb.ExecutionPlanUpdatesH\x00\x12\x38\n\rrequest_error\x18\t \x01(\x0b\x32\x1c.executor_api_pb.DataPayloadH\x07\x88\x01\x01\x12"\n\x15\x65xecution_duration_ms\x18\n \x01(\x04H\x08\x88\x01\x01\x42\x0e\n\x0creturn_valueB\x0b\n\t_functionB\x10\n\x0e_allocation_idB\x13\n\x11_function_call_idB\r\n\x0b_request_idB\x0f\n\r_outcome_codeB\x11\n\x0f_failure_reasonB\x10\n\x0e_request_errorB\x18\n\x16_execution_duration_ms"\x98\x02\n\x13\x46unctionCallRequest\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x61pplication\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nrequest_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12;\n\x07updates\x18\x04 \x01(\x0b\x32%.executor_api_pb.ExecutionPlanUpdatesH\x03\x88\x01\x01\x12$\n\x17source_function_call_id\x18\x06 \x01(\tH\x04\x88\x01\x01\x42\x0c\n\n_namespaceB\x0e\n\x0c_applicationB\r\n\x0b_request_idB\n\n\x08_updatesB\x1a\n\x18_source_function_call_id"\x16\n\x14\x46unctionCallResponse*\xf0\x01\n\x13\x44\x61taPayloadEncoding\x12!\n\x1d\x44\x41TA_PAYLOAD_ENCODING_UNKNOWN\x10\x00\x12#\n\x1f\x44\x41TA_PAYLOAD_ENCODING_UTF8_JSON\x10\x01\x12#\n\x1f\x44\x41TA_PAYLOAD_ENCODING_UTF8_TEXT\x10\x02\x12\'\n#DATA_PAYLOAD_ENCODING_BINARY_PICKLE\x10\x03\x12$\n DATA_PAYLOAD_ENCODING_BINARY_ZIP\x10\x04\x12\x1d\n\x19\x44\x41TA_PAYLOAD_ENCODING_RAW\x10\x05*\xd6\x01\n\x08GPUModel\x12\x15\n\x11GPU_MODEL_UNKNOWN\x10\x00\x12\x1e\n\x1aGPU_MODEL_NVIDIA_A100_40GB\x10\x01\x12\x1e\n\x1aGPU_MODEL_NVIDIA_A100_80GB\x10\x02\x12\x1e\n\x1aGPU_MODEL_NVIDIA_H100_80GB\x10\x03\x12\x1d\n\x19GPU_MODEL_NVIDIA_TESLA_T4\x10\x04\x12\x1a\n\x16GPU_MODEL_NVIDIA_A6000\x10\x05\x12\x18\n\x14GPU_MODEL_NVIDIA_A10\x10\x06*\xb3\x01\n\x16\x46unctionExecutorStatus\x12$\n FUNCTION_EXECUTOR_STATUS_UNKNOWN\x10\x00\x12$\n FUNCTION_EXECUTOR_STATUS_PENDING\x10\x01\x12$\n FUNCTION_EXECUTOR_STATUS_RUNNING\x10\x02\x12\'\n#FUNCTION_EXECUTOR_STATUS_TERMINATED\x10\x03*\xc2\x04\n!FunctionExecutorTerminationReason\x12\x30\n,FUNCTION_EXECUTOR_TERMINATION_REASON_UNKNOWN\x10\x00\x12\x46\nBFUNCTION_EXECUTOR_TERMINATION_REASON_STARTUP_FAILED_INTERNAL_ERROR\x10\x01\x12\x46\nBFUNCTION_EXECUTOR_TERMINATION_REASON_STARTUP_FAILED_FUNCTION_ERROR\x10\x02\x12H\nDFUNCTION_EXECUTOR_TERMINATION_REASON_STARTUP_FAILED_FUNCTION_TIMEOUT\x10\x03\x12\x32\n.FUNCTION_EXECUTOR_TERMINATION_REASON_UNHEALTHY\x10\x0c\x12\x37\n3FUNCTION_EXECUTOR_TERMINATION_REASON_INTERNAL_ERROR\x10\r\x12\x39\n5FUNCTION_EXECUTOR_TERMINATION_REASON_FUNCTION_TIMEOUT\x10\x0e\x12;\n7FUNCTION_EXECUTOR_TERMINATION_REASON_FUNCTION_CANCELLED\x10\x0f\x12,\n(FUNCTION_EXECUTOR_TERMINATION_REASON_OOM\x10\x10*\xa5\x01\n\x0e\x45xecutorStatus\x12\x1b\n\x17\x45XECUTOR_STATUS_UNKNOWN\x10\x00\x12\x1f\n\x1b\x45XECUTOR_STATUS_STARTING_UP\x10\x01\x12\x1b\n\x17\x45XECUTOR_STATUS_RUNNING\x10\x02\x12\x1b\n\x17\x45XECUTOR_STATUS_DRAINED\x10\x03\x12\x1b\n\x17\x45XECUTOR_STATUS_STOPPED\x10\x04*\x86\x01\n\x15\x41llocationOutcomeCode\x12#\n\x1f\x41LLOCATION_OUTCOME_CODE_UNKNOWN\x10\x00\x12#\n\x1f\x41LLOCATION_OUTCOME_CODE_SUCCESS\x10\x01\x12#\n\x1f\x41LLOCATION_OUTCOME_CODE_FAILURE\x10\x02*\xf4\x03\n\x17\x41llocationFailureReason\x12%\n!ALLOCATION_FAILURE_REASON_UNKNOWN\x10\x00\x12,\n(ALLOCATION_FAILURE_REASON_INTERNAL_ERROR\x10\x01\x12,\n(ALLOCATION_FAILURE_REASON_FUNCTION_ERROR\x10\x02\x12.\n*ALLOCATION_FAILURE_REASON_FUNCTION_TIMEOUT\x10\x03\x12+\n\'ALLOCATION_FAILURE_REASON_REQUEST_ERROR\x10\x04\x12\x32\n.ALLOCATION_FAILURE_REASON_ALLOCATION_CANCELLED\x10\x05\x12:\n6ALLOCATION_FAILURE_REASON_FUNCTION_EXECUTOR_TERMINATED\x10\x06\x12!\n\x1d\x41LLOCATION_FAILURE_REASON_OOM\x10\x07\x12\x36\n2ALLOCATION_FAILURE_REASON_CONSTRAINT_UNSATISFIABLE\x10\x08\x12.\n*ALLOCATION_FAILURE_REASON_EXECUTOR_REMOVED\x10\t2\xdf\x02\n\x0b\x45xecutorAPI\x12t\n\x15report_executor_state\x12+.executor_api_pb.ReportExecutorStateRequest\x1a,.executor_api_pb.ReportExecutorStateResponse"\x00\x12z\n\x1bget_desired_executor_states\x12\x30.executor_api_pb.GetDesiredExecutorStatesRequest\x1a%.executor_api_pb.DesiredExecutorState"\x00\x30\x01\x12^\n\rcall_function\x12$.executor_api_pb.FunctionCallRequest\x1a%.executor_api_pb.FunctionCallResponse"\x00\x62\x06proto3' ) _globals = globals() diff --git a/indexify/src/indexify/proto/executor_api_pb2.pyi b/indexify/src/indexify/proto/executor_api_pb2.pyi index 44053bc47..d1248fad5 100644 --- a/indexify/src/indexify/proto/executor_api_pb2.pyi +++ b/indexify/src/indexify/proto/executor_api_pb2.pyi @@ -572,29 +572,29 @@ class FunctionCallResult(_message.Message): ) -> None: ... class DesiredExecutorState(_message.Message): - __slots__ = ("function_executors", "allocations", "function_call_results", "clock") + __slots__ = ("function_executors", "allocations", "clock", "function_call_results") FUNCTION_EXECUTORS_FIELD_NUMBER: _ClassVar[int] ALLOCATIONS_FIELD_NUMBER: _ClassVar[int] - FUNCTION_CALL_RESULTS_FIELD_NUMBER: _ClassVar[int] CLOCK_FIELD_NUMBER: _ClassVar[int] + FUNCTION_CALL_RESULTS_FIELD_NUMBER: _ClassVar[int] function_executors: _containers.RepeatedCompositeFieldContainer[ FunctionExecutorDescription ] allocations: _containers.RepeatedCompositeFieldContainer[Allocation] + clock: int function_call_results: _containers.RepeatedCompositeFieldContainer[ FunctionCallResult ] - clock: int def __init__( self, function_executors: _Optional[ _Iterable[_Union[FunctionExecutorDescription, _Mapping]] ] = ..., allocations: _Optional[_Iterable[_Union[Allocation, _Mapping]]] = ..., + clock: _Optional[int] = ..., function_call_results: _Optional[ _Iterable[_Union[FunctionCallResult, _Mapping]] ] = ..., - clock: _Optional[int] = ..., ) -> None: ... class ExecutionPlanUpdate(_message.Message): diff --git a/server/proto/executor_api.proto b/server/proto/executor_api.proto index b5092a050..46ca2913d 100644 --- a/server/proto/executor_api.proto +++ b/server/proto/executor_api.proto @@ -190,6 +190,11 @@ message ExecutorState { // reconciled by Executor. Not included into state_hash. // Initial value on Executor startup is 0. optional uint64 server_clock = 12; + + // Catalog entry name that this executor is associated with. + optional string catalog_entry_name = 14; + + repeated FunctionCallWatch function_call_watches = 15; } // Updates that Executor wants to report to Server. If report_executor_state RPC is successful @@ -209,7 +214,6 @@ message FunctionCallWatch { message ReportExecutorStateRequest { optional ExecutorState executor_state = 1; optional ExecutorUpdate executor_update = 2; - repeated FunctionCallWatch function_call_watches = 3; } // A message sent by Server to Executor to acknowledge the receipt of ReportExecutorStateRequest. @@ -255,10 +259,10 @@ message FunctionCallResult { message DesiredExecutorState { repeated FunctionExecutorDescription function_executors = 1; repeated Allocation allocations = 2; - repeated FunctionCallResult function_call_results = 3; // Server supplied clock value used to deduplicate messages. Executor records max clock value // it observed and ignores all the messages with clock value <= the max observed value. - optional uint64 clock = 4; + optional uint64 clock = 3; + repeated FunctionCallResult function_call_results = 4; } enum AllocationOutcomeCode { diff --git a/server/src/executor_api.rs b/server/src/executor_api.rs index f8616369c..9857e7c77 100644 --- a/server/src/executor_api.rs +++ b/server/src/executor_api.rs @@ -842,7 +842,7 @@ impl ExecutorApi for ExecutorAPIService { .ok_or(Status::invalid_argument("executor_update is required"))?; let mut watch_function_calls = HashSet::new(); - for function_call_watch in &request.get_ref().function_call_watches { + for function_call_watch in &executor_state.function_call_watches { let executor_watch: ExecutorWatch = function_call_watch.try_into().unwrap(); watch_function_calls.insert(executor_watch); } diff --git a/server/src/state_store/executor_watches.rs b/server/src/state_store/executor_watches.rs index 0f4c34313..71d4c99ba 100644 --- a/server/src/state_store/executor_watches.rs +++ b/server/src/state_store/executor_watches.rs @@ -2,6 +2,8 @@ use std::collections::{HashMap, HashSet}; use tokio::sync::RwLock; +use crate::data_model::FunctionRunStatus; + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub struct ExecutorWatch { pub namespace: String, @@ -114,13 +116,18 @@ impl ExecutorWatches { updated_request_states: &HashMap, ) -> HashSet { // Build the set of ExecutorWatch objects for all updated function runs - let mut executor_watches = HashSet::new(); + let mut possible_watches = HashSet::new(); for (ctx_key, function_run_ids) in updated_function_runs { let Some(ctx) = updated_request_states.get(ctx_key) else { continue; }; for function_call_id in function_run_ids { - executor_watches.insert(ExecutorWatch { + if let Some(function_run) = ctx.function_runs.get(function_call_id) { + if function_run.status != FunctionRunStatus::Completed { + continue; + } + } + possible_watches.insert(ExecutorWatch { namespace: ctx.namespace.clone(), application: ctx.application_name.clone(), request_id: ctx.request_id.clone(), @@ -133,8 +140,8 @@ impl ExecutorWatches { let executors_guard = self.executors.read().await; let mut impacted_executors: HashSet = HashSet::new(); - for fc_id in executor_watches.iter() { - if let Some(executors) = requests_guard.get(fc_id) { + for possible_watch in possible_watches.iter() { + if let Some(executors) = requests_guard.get(possible_watch) { for ex in executors { // Include executor only if it currently has any watches if let Some(watches) = executors_guard.get(ex) && diff --git a/server/src/state_store/mod.rs b/server/src/state_store/mod.rs index 511b74374..40b3235e1 100644 --- a/server/src/state_store/mod.rs +++ b/server/src/state_store/mod.rs @@ -352,6 +352,12 @@ impl IndexifyState { .await; changed_executors.extend(impacted_executors.into_iter().map(|e| e.into())); } + if let RequestPayload::UpsertExecutor(req) = &request.payload { + if !req.watch_function_calls.is_empty() && req.update_executor_state { + changed_executors.insert(req.executor.id.clone()); + } + } + // Notify the executors with state changes { let mut executor_states = self.executor_states.write().await;