Skip to content

Remove throw from ext_proc data plane when client start failed - #39388

Merged
tyxia merged 4 commits into
envoyproxy:mainfrom
yanjunxiang-google:ext_proc_throw
May 21, 2025
Merged

tyxia merged 4 commits into
envoyproxy:mainfrom
yanjunxiang-google:ext_proc_throw

Conversation

@yanjunxiang-google

Copy link
Copy Markdown
Contributor

Remove throw from ext_proc data plane when client start failed

Signed-off-by: Yanjun Xiang <[email protected]>
@yanjunxiang-google

Copy link
Copy Markdown
Contributor Author

/assign @stevenzzzz @tyxia

@tyxia tyxia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, modulo a nit

Thanks

client_manager_.getOrCreateRawAsyncClientWithHashKey(config_with_hash_key, scope_, true);
THROW_IF_NOT_OK_REF(client_or_error.status());
if (!client_or_error.status().ok()) {
return nullptr;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

are there any logging/stats tracked this error case?

I feel it is good to have a logging line here?

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.

+1. Let's add a LOG_EVERY_N here.

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.

Done

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.

probably too spammy if there are a lot of request, let's do log_every_N_sec(10)

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.

This failure is very rare, and if it happens, we should just log it. BTW, there is no log_every_N_sec() in OSS.

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.

it will log too much when the config is in trouble, right now linear to QPS, I don't think that's worth that much.

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.

could you use the ENVOY_LOG_PERIODIC_MISC macro, weird naming.

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.

done

Signed-off-by: Yanjun Xiang <[email protected]>

@stevenzzzz stevenzzzz 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 modular the logging nit.

client_manager_.getOrCreateRawAsyncClientWithHashKey(config_with_hash_key, scope_, true);
THROW_IF_NOT_OK_REF(client_or_error.status());
if (!client_or_error.status().ok()) {
return nullptr;

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.

it will log too much when the config is in trouble, right now linear to QPS, I don't think that's worth that much.

client_manager_.getOrCreateRawAsyncClientWithHashKey(config_with_hash_key, scope_, true);
THROW_IF_NOT_OK_REF(client_or_error.status());
if (!client_or_error.status().ok()) {
return nullptr;

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.

could you use the ENVOY_LOG_PERIODIC_MISC macro, weird naming.

Signed-off-by: Yanjun Xiang <[email protected]>
@kyessenov

Copy link
Copy Markdown
Contributor

@stevenzzzz Could you take another look?
/wait

@stevenzzzz stevenzzzz 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.

Look good.

@yanjunxiang-google

Copy link
Copy Markdown
Contributor Author

kind ping

@tyxia
tyxia merged commit 99e3a5e into envoyproxy:main May 21, 2025
fishpan1209 pushed a commit to fishpan1209/envoy that referenced this pull request May 22, 2025
…proxy#39388)

Remove throw from ext_proc data plane when client start failed

---------

Signed-off-by: Yanjun Xiang <[email protected]>
Signed-off-by: Ting Pan <[email protected]>
@yanjunxiang-google
yanjunxiang-google deleted the ext_proc_throw branch May 19, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants