-
Notifications
You must be signed in to change notification settings - Fork 277
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
chore: enable correct_pagination_assets_after_creating_new_one test #5192
Open
aoyako
wants to merge
8
commits into
hyperledger-iroha:main
Choose a base branch
from
aoyako:restore_pagination_test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d3bb566
chore: enable correct_pagination_assets_after_creating_new_one test
aoyako 64e1d1b
Merge branch 'main' into restore_pagination_test
aoyako 8027386
Merge branch 'main' into restore_pagination_test
aoyako f7bd0c8
Merge branch 'main' into restore_pagination_test
aoyako c5d0af5
Merge branch 'main' into restore_pagination_test
aoyako 0e59aec
Merge branch 'main' into restore_pagination_test
aoyako 5d95541
Merge branch 'main' into restore_pagination_test
aoyako 5aacf7e
Merge branch 'main' into restore_pagination_test
aoyako File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think this test has failed for some other reason than the
FIXME
item. I see the same result by iterating oversubmit_blocking
and there are no transaction rejections due to too many instructions insubmit_all_blocking
. In my local 10 and 11 are the threshold of whether it passes or notThere 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.
what's the default fetch size, 10? this might be related to result batching
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.
The test fails due to the lexicographical sorting of strings ("1" -> "10" -> "11", not "1" -> "2" -> "3").
All of the sorting tests have this limit of 10 because they will also fail if the number is increased.
This test should verify that adding an asset in the middle should not break the ordering, which was not checked in the previous version.
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.
So the issue would be that metadata leaf values are implicitly transmuted from numbers to strings
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.
Yes, since the metadata value is a json string. I'm not sure if we have a functionality to specify a mapping/key function for sorting. Isn't the purpose of having json string to generalize metadata and defer custom processing to the user?
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.
Since
PartialOrd
andOrd
cannot be naturally derived fromserde_json::Value
, we could:Value
variantsThere 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.
good point. My previous comment should be disregarded. Now I think this is the way to go:
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.
If we go this way, the problem then is currently we are sorting query results only by metadata
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.
this is where it all started. But since then we moved to untyped metadata value. Maybe it would be good to provide a sorting function? The comparison function will get untyped metadata, parse it and then compare the objects
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.
Yes, there seems to be a trade-off between keeping metadata values untyped and serving query sorting on the peer side