-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix sort on get trace API and flaky test of conversation #1733
Fix sort on get trace API and flaky test of conversation #1733
Conversation
4027670
to
22d5ba2
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## feature/agent_framework_dev #1733 +/- ##
=================================================================
- Coverage 68.94% 68.92% -0.03%
+ Complexity 2612 2611 -1
=================================================================
Files 241 241
Lines 12875 12876 +1
Branches 1291 1291
=================================================================
- Hits 8877 8875 -2
- Misses 3392 3394 +2
- Partials 606 607 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
44b5c9b
to
e2b6b3d
Compare
eefa37e
to
19d9123
Compare
@HenryL27 @Zhangxunmt please help to review |
memory/src/main/java/org/opensearch/ml/memory/index/InteractionsIndex.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Hailong Cui <[email protected]>
…fetch the latest data Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
19d9123
to
82d62c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. This sorting may need to apply to "get Interactions" as well, but let's not overkill for now.
@Zhangxunmt there is no other sort key than create_time for interactions, do you mean we update the mappings of |
@Hailong-am , I mean the problem you described ideally applies to all docs that are sorted based on "date" field type, which includes conversation and interactions. However this race condition may be extremely rare for conversation/interaction because they are human-generated, so what you have changed in using the trace_number should be just enough. |
8dba50b
into
opensearch-project:feature/agent_framework_dev
Description
Fix sort on get trace Api, in the case two traces with create time are
"create_time": "2023-12-05T05:14:42.823172Z"
and"create_time": "2023-12-05T05:14:42.823833Z"
they are equally same date due to mapping field ofcreate_time
isdate
notdate_nanos
, either we change type todate_nanos
or add one more sort field.Add refresh policy to update interaction api so that get conversation api will able to fetch latest data.
fix flaky test for conversation
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.