Skip to content

[fix][functions] Revert "Enable Log4j2 async loggers (#15188)" - #17474

Merged
eolivelli merged 1 commit into
apache:masterfrom
cbornet:revert-15188
Sep 5, 2022
Merged

eolivelli merged 1 commit into
apache:masterfrom
cbornet:revert-15188

Conversation

@cbornet

@cbornet cbornet commented Sep 5, 2022 •

Copy link
Copy Markdown
Contributor

Fixes #15392

Motivation

This reverts commit 1e9a1f0.
When using a log-topic in Functions, an appender is added to all loggers to send the logs with the Pulsar client.
To prevent sending logs from the framework, the LogAppender is added before the function processing (JavaInstance::handleMessage) and removed just after.
This is a problem because since #15188, the logs are sent asynchronously and sometimes we remove the appender before the log is processed by the LogAppender.
And this is the reason why we see flakyness in testJavaLoggingFunction because me miss some logs.

See also #17471 that proposes another way to solve the issue but that maybe deserves more discussions.

Modifications

This reverts commit 1e9a1f0.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests, such as testJavaLoggingFunction.

Does this pull request potentially affect one of the following parts:

no

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    fix

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@cbornet cbornet changed the title Revert "Enable Log4j2 async loggers (#15188)" [fix][functions] Revert "Enable Log4j2 async loggers (#15188)" Sep 5, 2022
@Technoboy- Technoboy- added this to the 2.11.0 milestone Sep 5, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Sep 5, 2022
@eolivelli
eolivelli merged commit 35d3d5c into apache:master Sep 5, 2022
eolivelli pushed a commit that referenced this pull request Sep 5, 2022
This reverts commit 1e9a1f0.

(cherry picked from commit 35d3d5c)
@cbornet
cbornet deleted the revert-15188 branch September 5, 2022 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky-test: PulsarFunctionsJavaThreadTest.testJavaLoggingFunction

3 participants