Skip to content

Add QuestDB output component#115

Merged
gregfurman merged 9 commits into
warpstreamlabs:mainfrom
sklarsa:add-questdb
Sep 18, 2024
Merged

Add QuestDB output component#115
gregfurman merged 9 commits into
warpstreamlabs:mainfrom
sklarsa:add-questdb

Conversation

@sklarsa

@sklarsa sklarsa commented Sep 13, 2024

Copy link
Copy Markdown
Contributor

Adds an output component for writing to QuestDB tables using ILP (Influx Line Protocol) as implemented by the official QuestDB Go Client.

@gregfurman gregfurman self-requested a review September 13, 2024 15:40

@gregfurman gregfurman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for submitting this! All is looking good just some minor clarifications and suggestions.

Also, have you used QuestDB against our existing SQL components? Would be curious if it works out-the-box it and would be happy to extend them if need to do accomodate QuestDB!

Otherwise, your tests are passing on my local but I haven't (yet) tested this against a running QuestDB instance. Will do so soon 🥇

Comment thread internal/impl/questdb/output.go Outdated
Comment thread internal/impl/questdb/output.go
Comment thread internal/impl/questdb/output.go Outdated
Comment thread internal/impl/questdb/output.go Outdated
Comment thread internal/impl/questdb/output.go
Comment on lines +215 to +216
// todo: is this the correct interpretation of max-in-flight?
qdb.WithMaxSenders(mif)(w.pool)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The max_in_flight field is specifically for internal Bento messages. This WithMaxSenders looks like it's referring to the number of QuestDB Senders which I believe are different (from QuestDB dotnet docs):

Sender is single-threaded, and uses a single connection to the database.
If you want to send in parallel, you can use multiple senders and standard async tasking.

cc @jem-davies Thoughts on this?

Reminds me that we could probably add a StreamTestOptMaxInFlight test to the integration tests. Will comment.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Quick update here: not sure about the above. Have asked Jem to take a look.

What other value would make sense for the sender count?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The pool defaults to a maximum of 64 senders. Ideally, we would use a sender per bento thread/goroutine, but it's not clear to me how many concurrent executions of WriteBatch can happen at a single time. I'm guessing max_in_flight is a maximum message count then?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I can take a look tomorrow - just busy at the moment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah it's a maximum message count. Happy with approving and seeing how performance looks, and iterating on this at another point

Comment thread internal/impl/questdb/output.go
Comment thread internal/impl/questdb/output.go Outdated
sklarsa and others added 4 commits September 16, 2024 13:41
Co-authored-by: Greg Furman <31275503+gregfurman@users.noreply.github.com>
Co-authored-by: Greg Furman <31275503+gregfurman@users.noreply.github.com>
@sklarsa

sklarsa commented Sep 16, 2024

Copy link
Copy Markdown
Contributor Author

Also, have you used QuestDB against our existing SQL components? Would be curious if it works out-the-box it and would be happy to extend them if need to do accomodate QuestDB!

I have not. We implement pgwire and should be compatible with standard postgres clients. I'll give that a shot this week, although we really only recommend using SQL for data extraction and querying, not ingestion.

@gregfurman

Copy link
Copy Markdown
Collaborator

Lastly, can you add the docs for the component? Running make docs should suffice 🙂

Once that's added I'll approve and we can ship this bad-boy

@sklarsa

sklarsa commented Sep 17, 2024

Copy link
Copy Markdown
Contributor Author

Lastly, can you add the docs for the component? Running make docs should suffice 🙂

Done! Thank you :-)

@gregfurman gregfurman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Just fixed the formatting of that description string.

@gregfurman gregfurman merged commit 431e8b5 into warpstreamlabs:main Sep 18, 2024
aronchick pushed a commit to aronchick/bento that referenced this pull request Feb 19, 2026
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.

3 participants