ripple / rippled-historical-database

SQL database as a canonical source of historical data
99 stars 68 forks source link

Unable to get payment history with descending true #151

Closed greed0803 closed 5 years ago

greed0803 commented 7 years ago

Unable to get payment history with descending true

https://data.ripple.com/v2/accounts//payments?type=received&limit=1000&start=2017-08-31T00:00:00Z&end=2017-08-31T23:59:59Z&descending=true

returns

{ "result": "error", "message": "unable to retrieve payments" }

shekenahglory commented 6 years ago

The URL here is invalid, but likely the query will work if you remove descending=true, probably the same issue as https://github.com/ripple/rippled-historical-database/issues/157

0x49D1 commented 6 years ago

Same here: https://data.ripple.com/v2/accounts/rnMCfd99pwRE8u4LxE43Z1pDzock2kXbLQ/transactions?type=Payment&result=tesSUCCESS&descending=true&limit=20 The query used to work and I was using it to get the latest transactions from time-to-time manually in cases, when we had to stop our rippled instance. Now the query works without descending filter, but that is useless for our case. Is this a bug? Or is there any other more correct way to, lets say, get 50 latest received transactions? Seems that the problem is with mix of result and descending filters.

shekenahglory commented 6 years ago

Yes its a known bug in hbase with reverse scans, it won't be fixed in this version of the API, but the next version won't have the issue. Until then, is it possible to use ascending with a limited range via start and end dates?

0x49D1 commented 6 years ago

@shekenahglory Yes, we can use such option (the drawback is that we have to always change dates/limits to get specifically latest transactions everytime we need). But for now removing the result filter did the trick and scan started to work without errors.. So left the version without filter and do the additional filtration on our side.