-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
Description
This is a bug in clp-ffi-js. Open an issue here so we remember to retest the timestamp URL code once it's fixed.
The findNearestLogEventByTimestamp
method in ClpIrDecoder.ts
always returns the largest index instead of the correct nearest log event index. This appears to be an issue with the underlying clp-ffi-js library implementation.
Steps to Reproduce
- Change
findNearestLogEventByTimestamp
code inClpIrDecoder.ts
to:
findNearestLogEventByTimestamp (timestamp: number): Nullable<number> {
console.log(timestamp)
const ret = this.#streamReader.findNearestLogEventByTimestamp(BigInt(timestamp));
console.log(ret)
return ret;
}
- Test with different timestamps
- Observe that the method always returns the largest index regardless of the target timestamp
Expected Behavior
The method should return the index of the log event with the timestamp closest to (and not exceeding) the target timestamp.
Actual Behavior
The method always returns the largest index.
Context
This issue was identified during the implementation of timestamp-based log seeking in PR #152. The bug is in the clp-ffi-js library and cannot be addressed in the current PR.
Related
Metadata
Metadata
Assignees
Labels
No labels