Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Feed Iterator - The response does not contain all the service headers #3115

Open
ealsur opened this issue Mar 24, 2022 · 0 comments
Open
Assignees
Labels
bug Something isn't working ChangeFeed
Milestone

Comments

@ealsur
Copy link
Member

ealsur commented Mar 24, 2022

#1933 introduced an issue when the service response is converted to a Change Feed response, not all headers are copied:

CrossFeedRangePage<Pagination.ChangeFeedPage, ChangeFeedState> crossFeedRangePage = enumerator.Current.Result;
Pagination.ChangeFeedPage changeFeedPage = crossFeedRangePage.Page;
ResponseMessage responseMessage;
if (changeFeedPage is Pagination.ChangeFeedSuccessPage changeFeedSuccessPage)
{
responseMessage = new ResponseMessage(statusCode: System.Net.HttpStatusCode.OK)
{
Content = changeFeedSuccessPage.Content
};
}
else
{
responseMessage = new ResponseMessage(statusCode: System.Net.HttpStatusCode.NotModified);
}

responseMessage.Headers.ContinuationToken = continuationToken;
responseMessage.Headers.RequestCharge = changeFeedPage.RequestCharge;
responseMessage.Headers.ActivityId = changeFeedPage.ActivityId;
responseMessage.Trace = trace;

If there are any other extra backend headers that are being received, they are getting lost on the conversion step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ChangeFeed
Projects
Status: Triage
Development

No branches or pull requests

4 participants