Skip to content

Conversation

@lucia-w
Copy link
Contributor

@lucia-w lucia-w commented Nov 12, 2025

  • We need to check if q.resultSize is not 0 before dividing by q.resultSize

}
// Using the newly calibrated result size, figure out the new throttle limit
// on the result cache
throttleThreshold := uint64((common.StorageSize(blockCacheMemory) + q.resultSize - 1) / q.resultSize)
Copy link
Contributor

Choose a reason for hiding this comment

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

It appears we stop early if there are no completed items (line 298). Can you explain how resultSize would be 0 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, thank you for your question. But that early return only fires in non-blocking mode: !block.
In the blocking mode, is it possible that when Close is called before any fetch result finishes, the loop breaks?

Copy link
Contributor

Choose a reason for hiding this comment

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

No. in blocking mode we will wait until there are results on line 315

@jwasinger
Copy link
Contributor

Appears to be AI-generated and not necessary.

@jwasinger jwasinger closed this Nov 12, 2025
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