-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
mongoc_apm_command_succeeded_get_duration and mongoc_apm_command_failed_get_duration both return an int64_t, which could exceed the size of getDurationMicros()'s return value if PHP is compiled for 32-bit.
I don't think it's worth conditionally returning a string or Int64 type, especially since this is just for command monitoring, but perhaps we should just note this in the documentation. We might also consider displaying a warning when the return value is truncated, as is done for wtimeout in PHPC-1411. It would also be helpful to verify that the value is truncated and we need not worry about inadvertently returning a negative value.
I came across this while working on AppVeyor builds in PHPC-1131 when both monitoring-commandSucceeded-001.phpt and monitoring-commandFailed-001.phpt failed.