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

bug(storev3): can't advance cursor #2745

Closed
richard-ramos opened this issue May 30, 2024 · 1 comment
Closed

bug(storev3): can't advance cursor #2745

richard-ramos opened this issue May 30, 2024 · 1 comment
Assignees
Labels
bug Something isn't working critical This issue needs critical attention effort/hours Estimated to be completed in a few hours
Milestone

Comments

@richard-ramos
Copy link
Member

Problem

For this criteria in /dns4/store-01.do-ams3.shards.test.status.im/tcp/30303/p2p/16Uiu2HAmAUdrQ3uwzuE4Gy4D56hX6uLKEeerJAnhKEHZ3DxF1EfT, there should be around ~510 messages

{
 "request_id": "test1"
 "include_data":true,
 "pubsub_topic":"/waku/2/rs/16/32",
 "time_start":1717038870472334766,
 "time_end":1717038999574854537,
 "pagination_limit":100
}

If I execute the query, I get the first 100 results succesfully, and the cursor (represented here in std base64): Mlnwx3p1TukFi+UnxSc++5XjVLUBjBxMByRDjc+jgV8=

If i proceed to ask for the next page of results:

{
 "request_id": "test2",
 "include_data":true,
 "pubsub_topic":"/waku/2/rs/16/32",
 "time_start":1717038870472334766,
 "time_end":1717038999574854537,
 "pagination_cursor":"Mlnwx3p1TukFi+UnxSc++5XjVLUBjBxMByRDjc+jgV8=",
 "pagination_limit":100
}

I get the following response:

 {"request_id":"test2","status_code":200,"status_desc":"OK"}

which is not okay because there are more messages (i verified with legacy store)

Interestingly enough, if I change the pagination limit to 10, i still see the same behavior: 10 results on first page, and no messages on second page.

This problem is likely fixed with @SionoiS archive refactor.

@Ivansete-status
Copy link
Collaborator

Ivansete-status commented Jul 12, 2024

Closing as per #2761
I tested it with the message-finde establishing pages of 2 and it worked fine.

Used the following to validate that:

while true
do

  timeEnd=$(date +%s%N)
  timeBegin=$[ ${timeEnd} - 86400000000000 ]
#  timeBegin=$[ ${timeEnd} - 111000000000 ]

  timeBegin=1720796905323670344
  #    --content-topic=/waku/1/0xd811cd50/rfc26 \
    #    --content-topic=/waku/1/0x89bed93d/rfc26 \
      #  --content-topic=/waku/1/0xc95d2429/rfc26 \
       # --content-topic=/waku/1/0xa0a6b41b/rfc26 \
   
  echo "=================================="
  echo " Before query "
  ./build/query \
      --cluster-id=2 \
      --storenode=/ip4/127.0.0.1/tcp/60000/p2p/16Uiu2HAmVFXtAfSj4EiR7mL2KvL4EE2wztuQgUSBoj2Jx2KeXFLN \
      --pubsub-topic=/waku/2/rs/2/1 \
      --content-topic=my-ctopic-1 \
      --start-time=${timeBegin} \
      --end-time=${timeEnd} \
      --pagesize=2 

  echo "=================================="
  echo ""
  sleep 10
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical This issue needs critical attention effort/hours Estimated to be completed in a few hours
Projects
Archived in project
Development

No branches or pull requests

4 participants