Skip to content

Conversation

eabatalov
Copy link
Contributor

This is much better for slow functions that run for many minutes. With queue size of 2 Server doesn't scale up FEs for such functions. This ends up bottlenecking cluster because allocs wait for many minutes in the queue of size 2 until they can run.

This is much better for slow functions that run for many minutes.
With queue size of 2 Server doesn't scale up FEs for such functions.
This ends up bottlenecking cluster because allocs wait for many
minutes in the queue of size 2 until they can run.
@eabatalov eabatalov requested a review from diptanu September 18, 2025 20:38
@eabatalov eabatalov marked this pull request as ready for review September 18, 2025 20:38
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Bug: Test Fails to Validate Function Executor Reuse

The test test_server_uses_the_same_function_executor_if_fe_task_queue_doesnt_overflow no longer validates its intended behavior. Changing _FE_ALLOCATIONS_QUEUE_SIZE to 1 limits it to a single invocation, which prevents it from verifying function executor reuse for multiple tasks when the queue doesn't overflow. This makes the test trivial.

indexify/tests/cli/test_server_fe_scaling.py#L26-L27

# Server side configuration.
_FE_ALLOCATIONS_QUEUE_SIZE = 1

indexify/tests/cli/test_server_fe_scaling.py#L68-L91

graph_name = test_graph_name(self)
version = str(time.time())
graph = Graph(
name=graph_name,
description="test",
start_node=TestFunction,
version=version,
)
graph = RemoteGraph.deploy(
graph=graph, code_dir_path=graph_code_dir_path(__file__)
)
invocation_ids: List[str] = []
for _ in range(_FE_ALLOCATIONS_QUEUE_SIZE):
invocation_id = graph.call(sleep_secs=0.01)
invocation_ids.append(invocation_id)
fe_ids: Set[str] = set()
for invocation_id in invocation_ids:
output = wait_function_output(graph, invocation_id, TestFunction.name)
self.assertEqual(len(output), 1)
fe_ids.add(output[0])

Fix in Cursor Fix in Web


@eabatalov
Copy link
Contributor Author

About the cursor detected bug, yes it's not correct tests anymore but I'd prefer to keep it in case we change the queue setting back.

@eabatalov eabatalov requested a review from calavera September 22, 2025 11:51
@eabatalov eabatalov merged commit 0fce198 into main Sep 22, 2025
10 checks passed
@eabatalov eabatalov deleted the eugene/default-queue-size-1 branch September 22, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants