Skip to content

Fix request's received_time#459

Merged
lo-simon merged 4 commits intosony:masterfrom
lo-simon:fix-received_time
Aug 18, 2025
Merged

Fix request's received_time#459
lo-simon merged 4 commits intosony:masterfrom
lo-simon:fix-received_time

Conversation

@lo-simon
Copy link
Collaborator

@lo-simon lo-simon commented Aug 14, 2025

While running the testsite against Windows Registry (Visual Studio 2022 (Version 17.13.6)) on IS-04-02 test_32, the tests occasionally failed due to an incorrect received_time during the re-registration of the same resource with a different version.

The failures were accompanied by a log entry from the Registry:

2025-05-29 16:19:24.207: severe error: 48f0: Registration requested for node: 11e3a74a-5e69-46ff-bad3-1376c8ca53b2 at 1748535601:191227700 processed before request received at 1748535601:191227700

The error is originating in registration_api.cpp

const auto received_time = req.headers().find(details::received_time);

The failure of test_23 is intermittent, but can be reproduced reliably by sticking a loop around lines 2119 to 2128 of the test code (looping 300 times seemed to do the job)
https://github.com/AMWA-TV/nmos-testing/blob/f47247ac236b3080711219b407413e45e0b309fe/nmostesting/suites/IS0402Test.py#L2119

The problem seems to occur only in Windows, specifically with the boost version of time_point::now, which sometimes returns the same value even after a small increment of time. This issue does not seem to be happening when using the std::chrono for the time implementation.

Co-authored-by: jonathan-r-thorpe <64410119+jonathan-r-thorpe@users.noreply.github.com>
lo-simon and others added 2 commits August 18, 2025 15:18
Co-authored-by: jonathan-r-thorpe <64410119+jonathan-r-thorpe@users.noreply.github.com>
@lo-simon lo-simon merged commit 61533e2 into sony:master Aug 18, 2025
10 checks passed
@lo-simon lo-simon deleted the fix-received_time branch August 18, 2025 16:32
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