Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Sometimes API returns erroneously empty list of edges #87

Open
vporton opened this issue Jul 2, 2021 · 4 comments
Open

Sometimes API returns erroneously empty list of edges #87

vporton opened this issue Jul 2, 2021 · 4 comments

Comments

@vporton
Copy link

vporton commented Jul 2, 2021

Sometimes request

query {
  transactions(
    first: 1
    tags: [{ name: "Content-Type", values: ["text/pdf"] }]
  ) {
    edges {
      cursor
      node {
        id
        owner {
          address
        }
        tags {
          name
          value
        }
      }
    }
  }
}

is responded with erroneous "edges": []

{
  "data": {
    "transactions": {
      "edges": []
    }
  }
}

This seems completely random when edges are erroneously reported empty.

docker-compose did not crash during this bug happening.

gateway commit f6d5d370806b8efe808218ccbcf3f4592afc25e9.

root@many-files:~# tail -f ~manyfiles/arweave.log 
server_1    | 
server_1    | info: [database] could not retrieve tx o9a-tUOc0RtS0WEf6jdVrXmnqMDYG9DHWXv0Sx9hOF8 at height 325855 , missing tx stored in .rescan
server_1    | 
server_1    | info: [database] could not retrieve tx Q5jlQh4ZEwthUsOod6NMuEitAu1t6x8oQzbd9NkZS_Q at height 325914 , attempting to retrieve again
server_1    | 
server_1    | info: [database] could not retrieve tx pISJjCTPD6GjhMxMccjy1TbkvXbb-XSVWbL1drRpicc at height 325914 , attempting to retrieve again
server_1    | 
server_1    | info: [database] could not retrieve tx Q5jlQh4ZEwthUsOod6NMuEitAu1t6x8oQzbd9NkZS_Q at height 325914 , missing tx stored in .rescan
server_1    | 
server_1    | info: [database] could not retrieve tx pISJjCTPD6GjhMxMccjy1TbkvXbb-XSVWbL1drRpicc at height 325914 , missing tx stored in .rescan
server_1    | 
server_1    | info: [database] could not retrieve tx umfo0SXYxufnWuXsv8F57x0zS2VBQ9yYysCjiFtDuoo at height 325971 , attempting to retrieve again
server_1    | 
server_1    | info: [database] could not retrieve tx umfo0SXYxufnWuXsv8F57x0zS2VBQ9yYysCjiFtDuoo at height 325971 , missing tx stored in .rescan
@vporton
Copy link
Author

vporton commented Jul 2, 2021

Note that repeated (the same) requests return the same erroneous result.

Neither

docker-compose restart server

nor restarting docker-compose
solve the problem (that is does not change the returned response).

@vporton
Copy link
Author

vporton commented Jul 2, 2021

Also note in the past I had many "not enough disk space" errors inside the postgres Docker container (due to misconfigured Docker).

Maybe these "not enough space" in the past caused this bug in the present? Should I delete the data and start syncing the DB anew?

@vporton
Copy link
Author

vporton commented Jul 2, 2021

Oh, it should be application/pdf, closing.

@vporton vporton closed this as completed Jul 2, 2021
@vporton
Copy link
Author

vporton commented Jul 2, 2021

I reopen the bug:

I read several HTML files "in chain" passing the cursor value from the previous query to the next query. And it produces a list of just three files, despite I have many. This seems to happen only from time to time. It is a serious bug.

I do the following three requests in order, with no request (at least if no hacker intervened) in-between.

Note that I changed the spacing below.

query {
transactions(
    first: 1,
    tags: [{
    name: "Content-Type",
    values: ["text/html"]
}]
) {
    edges {
        cursor
        node {
            id
            owner {
                address
            }
            tags {
                name
                value
            }
        }
    }
}
}
transactions: Object { edges: (1) […] }
​​​edges: Array [ {…} ]
​​​​0: Object { cursor: "WyIyMDIxLTA3LTAyVDA1OjQxOjAzLjgzOFoiLDFd", node: {…} }
query {
transactions(
    after: "WyIyMDIxLTA3LTAyVDA1OjQxOjAzLjgzOFoiLDFd"
    first: 1,
    tags: [{
    name: "Content-Type",
    values: ["text/html"]
}]
) {
    edges {
        cursor
        node {
            id
            owner {
                address
            }
            tags {
                name
                value
            }
        }
    }
}
}
transactions: Object { edges: (1) […] }
​​​edges: Array [ {…} ]
​​​​0: Object { cursor: "WyIyMDIxLTA3LTAyVDA1OjQxOjAzLjgzOFoiLDJd", node: {…} }
query {
transactions(
    after: "WyIyMDIxLTA3LTAyVDA1OjQxOjAzLjgzOFoiLDJd"
    first: 1,
    tags: [{
    name: "Content-Type",
    values: ["text/html"]
}]
) {
    edges {
        cursor
        node {
            id
            owner {
                address
            }
            tags {
                name
                value
            }
        }
    }
}
}
transactions: Object { edges: [] }
​​​edges: Array []

@vporton vporton reopened this Jul 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant