Skip to content

Commit 85195dd

Browse files
committed
Some adjusts
1 parent c89dbfe commit 85195dd

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

kind-1000.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
kubeadmConfigPatches:
6+
- |
7+
kind: InitConfiguration
8+
nodeRegistration:
9+
kubeletExtraArgs:
10+
max-pods: "1000"

lib/actors/actor/entity/invocation.ex

+6-4
Original file line numberDiff line numberDiff line change
@@ -237,19 +237,19 @@ defmodule Actors.Actor.Entity.Invocation do
237237
Tracer.with_span "invoke-host" do
238238
interface.invoke_host(request, state, @default_actions)
239239
|> case do
240-
{:ok, response, state} ->
240+
{:ok, response, new_state} ->
241241
Tracer.add_event("successful-invocation", [
242242
{:ok, "#{inspect(response.updated_context.metadata)}"}
243243
])
244244

245-
build_response(request, response, state, opts)
245+
build_response(request, response, new_state, opts)
246246

247-
{:error, reason, state} ->
247+
{:error, reason, new_state} ->
248248
Tracer.add_event("failure-invocation", [
249249
{:error, "#{inspect(reason)}"}
250250
])
251251

252-
{:reply, {:error, reason}, state, :hibernate}
252+
{:reply, {:error, reason}, new_state, :hibernate}
253253
end
254254
end
255255

@@ -278,6 +278,8 @@ defmodule Actors.Actor.Entity.Invocation do
278278
current_state = Map.get(actor_state || %{}, :state)
279279
current_tags = Map.get(actor_state || %{}, :tags, %{})
280280

281+
# TODO: Validate state before invoke
282+
281283
%ActorInvocation{
282284
actor: id,
283285
command_name: command,

0 commit comments

Comments
 (0)