GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — #142: Implemented async and thread-safe logging by sgn4sangar · Pull Request #152 · exasol/udf-runner-cpp

Conversation

@sgn4sangar

@sgn4sangar sgn4sangar commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

fixes #142

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sgn4sangar
Committing design spec for async and thread-safe logging
46781af
@sgn4sangar
sgn4sangar requested a deployment to v2-fuzzing-pr-approval November 27, 2026 05:21 — with GitHub Actions Waiting
@sonarqubecloud

sonarqubecloud Bot commented Nov 27, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tomuben
tomuben reviewed Nov 27, 2026
View reviewed changes
Comment thread doc/design/v2/runner/logging_provider_design.md
Comment on lines +45 to +47
Each producer thread has its own stream and buffer. When a thread first calls,
for example, `provider.debug()`, `thread_local_stream(state, severity)` creates
that pair and retains it in a cache local to that thread. A later `debug()` call

@tomuben tomuben Nov 27, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Maybe add some sample code explaining this.
I'am wondering if it will use thread_local or something else.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tomuben
tomuben reviewed Nov 27, 2026
View reviewed changes
Comment thread doc/design/v2/runner/logging_provider_design.md
Comment on lines +31 to +35
The concrete provider receives a group at construction. Its group is immutable
and is attached to every record emitted by that provider. A component that
needs a distinct group owns a distinct provider, for example
`LoggingProvider{"protocol"}`. The group is not a stream manipulator and is
not part of `LoggingProviderIf`.

@tomuben tomuben Nov 27, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This mean there will be one queue and logging thread per group. That could be many threads.
I believe we should change the architecture, that there is still only one LoggingProvider, which then just can create LoggingInstance instances (Which then implements the current LoggingProviderIf).
=> All share the same queue and background. Basically only the group will be part of the log prefix only.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tomuben
tomuben reviewed Nov 27, 2026
View reviewed changes
Comment thread doc/design/v2/runner/logging_provider_design.md
Comment on lines +146 to +149
- An empty enabled-group set permits every group, including the empty
(ungrouped) group.
- A non-empty enabled-group set permits only exact members; it therefore
excludes the empty group unless the empty string is explicitly present.

@tomuben tomuben Nov 27, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

How groups can be enabled/disabled? Will there be some kind of config file?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tomuben
tomuben reviewed Nov 27, 2026
View reviewed changes
Comment thread doc/design/v2/runner/logging_provider_design.md
they are not valid for further caller use once the provider begins shutdown.
The precondition prevents late commits from being placed behind the stop item.

```mermaid

@tomuben tomuben Nov 27, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This diagram has some problem, Github can't render it

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tomuben
tomuben reviewed Nov 27, 2026
View reviewed changes
Comment thread doc/design/v2/runner/logging_provider_design.md
The writer blocks waiting for queue items. It writes accepted `LogRecord`
items in queue order and exits only after consuming a stop item. Provider
destruction has a caller-side precondition: clients have stopped using the
provider and its returned streams. It then enqueues the stop item and joins the

@tomuben tomuben Nov 27, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think we should add a section explaining the shutdown in more detail.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

This branch is waiting to be deployed

1 waiting deployment
v2-fuzzing-pr-approval — 46781af6 Waiting Nov 27, 2026 by sgn4sangar via pr_approval #444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tomuben tomuben tomuben left review comments

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Replace v2 logging stub with thread-safe asynchronous provider

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@sgn4sangar @tomuben
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.