Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feat/add max result size#3406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
avallete wants to merge2 commits intobrianc:master
base:master
Choose a base branch
Loading
fromavallete:feat/add-max-result-size

Conversation

avallete
Copy link

@avalleteavallete commentedMar 19, 2025
edited
Loading

Related:#3405

@brianc
Copy link
Owner

I appreciate the work here & the thought...I'm just not sure this is something we should support? It seems very much like a "don't do that query" kinda thing. It's loosely similar to "i wrote an infinite loop in my program. it should automatically abort instead." If your table has rows or columns that are gigabytes in size and you attempt to read them....then it's not gonna work well. I would be surprised if this works well inany database tool...though node is exceptionally limited with ram compared to some desktop tools. What about truncating the column in the query so you only read thefirst number of characters from the column or something else? This feels to me like code to prevent a problem that is more of a use-case error than an actual bug or feature.

@sehrope
Copy link
Contributor

Haven't looked through the PR itself to see if it makes sense, but I can see a valid use for something like this when you're not actually sure what SQL the user is executing in advance (e.g., a building a database GUI or report generator that's using this driver to execute the commands). Having it fail and possibly close the connection is okay as long as it's handled gracefully (v.s. the alternative of an OOM killing the node process).

@avallete
Copy link
Author

avallete commentedMar 20, 2025
edited
Loading

Hey@brianc !

Thank's for the comment. Indeed, as stated in the issue, the use case here is actually one where the actor "performing the query" and the "database" are two separate entity.

Basically, an example would be an api serving a web client, and proxying the "queries" in and out of the user database. The web-client allowing the user to run arbitrary queries and see the results for it in the browser.

In such case, when a user query can OOM the "api server" accidentally forces the whole machine to die and reboot a new instance which is not ideal. Because then, the user doesn't get it's response but other connections that could be on the same instance from other users will also dies from the OOM.

I could understand if that's not something you're willing to pursue though as it's indeed corner-casy. I opened the PR because of this comment on an older issue mentioning similar problem:#2336 (comment)

Let me know how you want to proceed.

jgoux reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@avallete@brianc@sehrope

[8]ページ先頭

©2009-2025 Movatter.jp