Skip to content

Conversation

@shivaspeaks
Copy link
Member

Implements server feature fail_on_data_errors, per gRFC A88: https://github.com/grpc/proposal/blob/master/A88-xds-data-error-handling.md

@shivaspeaks shivaspeaks force-pushed the server_feature_fail_on_data_errors branch from 584e614 to 342c6e1 Compare December 2, 2025 08:47
@shivaspeaks shivaspeaks marked this pull request as ready for review December 2, 2025 09:00
Copy link
Contributor

@kannanjgithub kannanjgithub left a comment

Choose a reason for hiding this comment

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

Review comments.

"Resource " + resource + " deleted from server");
onAmbientError(deletionStatus, processingTracker);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What about the handling here that I commented about in the previous PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the changes here in the onAbsent method in this PR addresses that.

When fail_on_data_errors is false: The code enters the if (xdsDataErrorHandlingEnabled && !failOnDataErrors) block. This calls onAmbientError() and then immediately returns. This preserves the cached data and treats the deletion as a non-fatal ambient error, as you suggested.

When fail_on_data_errors is true: The if condition is not met, so the code falls through to call onResourceDoesNotExist(). This method then drops the cached resource by setting data = null and calls onResourceChanged() with a NOT_FOUND status to propagate the fatal error.

// delete cached data so onError will call onResourceChanged instead of onAmbientError.
// When xdsDataErrorHandlingEnabled is false, use old behavior (always keep cached data).
boolean xdsDataErrorHandlingEnabled =
io.grpc.xds.client.BootstrapperImpl.xdsDataErrorHandlingEnabled;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just import BootstrapperImpl and directly reference BootstrapperImpl.xdsDataErrorHandlingEnabled in the if condition.

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.

2 participants