Skip to content
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

Inconsistent Order by createdAt_ASC #267

Open
preschian opened this issue Apr 8, 2024 · 8 comments
Open

Inconsistent Order by createdAt_ASC #267

preschian opened this issue Apr 8, 2024 · 8 comments

Comments

@preschian
Copy link
Member

Hi, I just found out that there are some issues with ordering with our query.

  1. Is there a way to get consistent order to our query?
  2. Can the query be told to purge some specific ID?
claim 10 drops trigger update metadata
id,name,blockNumber
379-2404223588,MEADOW,6750520
379-2404238914,MEADOW,6750520
379-2404144915,MEADOW #150,6750520
379-2404257488,MEADOW #151,6750520
379-2404267204,MEADOW #152,6750520
379-2404270139,MEADOW #155,6750520
379-2404285152,MEADOW #147,6750520
379-2404387843,MEADOW #149,6750520
379-2404624504,MEADOW #153,6750520
379-2404630981,MEADOW #148,6750520
id,name,blockNumber
379-2404144915,MEADOW #150,6750520
379-2404257488,MEADOW #151,6750520
379-2404270139,MEADOW #155,6750520
379-2404285152,MEADOW #147,6750520
379-2404387843,MEADOW #149,6750520
379-2404624504,MEADOW #153,6750520
379-2404630981,MEADOW #148,6750520
379-2404223588,MEADOW #147,6750520
379-2404238914,MEADOW #148,6750520
379-2404267204,MEADOW #152,6750520
Screenshot 2024-04-08 at 20 56 27 Screenshot 2024-04-08 at 21 00 44

related: kodadot/nft-gallery#10025

@vikiival
Copy link
Member

vikiival commented Apr 8, 2024

Can you please expand your thoughts please?

@preschian
Copy link
Member Author

Hi Vik, the order from NFTs with the same block numbers is inconsistent.

while claiming the drops, this id 379-2404223588 is on index 146
then, I test it by updating the metadata for all of them. Then, the order was changed. This id 379-2404223588 was changed to index 147

The expected result is that 379-2404223588 is still on index 146. All of them should be the same before and after

Is there a way to make it consistent? Currently, the order is using "orderBy": ["createdAt_ASC"]

Can the query be told to purge some specific ID?

alternatively, is there a way to purge some data to query?

@vikiival
Copy link
Member

vikiival commented Apr 8, 2024

Hi Vik, the order from NFTs with the same block numbers is inconsistent.

while claiming the drops, this id 379-2404223588 is on index 146 then, I test it by updating the metadata for all of them. Then, the order was changed. This id 379-2404223588 was changed to index 147

Fixed for you in 44c9650

Can the query be told to purge some specific ID?
alternatively, is there a way to purge some data to query?

Still dont understand, sorry

@vikiival
Copy link
Member

vikiival commented Apr 8, 2024

Made update in #268, it should be much faster

@preschian
Copy link
Member Author

Still dont understand, sorry

something like hit our query endpoint (mutation graphql), then the query will reindex the item again

Made update in #268, it should be much faster

thank you

@vikiival
Copy link
Member

vikiival commented Apr 8, 2024

something like hit our query endpoint (mutation graphql), then the query will reindex the item again

Well, I can do that either manually or reindex

Since I made #268 I need to make deploy anyway

@preschian
Copy link
Member Author

preschian commented Apr 8, 2024

any idea why indexer return wrong metadata. I'm trying to update metadata on ahk: https://assethub-kusama.subscan.io/extrinsic/6751672-2

the metadata return #153: https://fxart-beta.kodadot.workers.dev/metadata/v1/json?chain=ahk&collection=379&nft=2404285152&metadata=ipfs:%2F%2Fbafybeihutexevnef7j4msobm5v5uczx2mempxeixihnbgrmpwqogzcbtzm%2F0.json

but, on indexer always return #147: https://kodadot.xyz/ahk/gallery/379-2404285152

Well, I can do that either manually or reindex

oohh, I mean reindex but just for specific item only, not reindex all from the starts

@vikiival
Copy link
Member

vikiival commented Apr 8, 2024

oohh, I mean reindex but just for specific item only, not reindex all from the starts

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

No branches or pull requests

2 participants