Inconsistency in API data which is developed in Spring boot?

6/22/2018

I am developing an API using JAVA SpringBoot, which will return response in JSON format. I am facing data inconsistency in response.

I am returning data like this

 {
     "type": "Plan",
     "programs":[
         {
            .....
            "courses":[
              {......}
              iam geting data
            ]
         }
     ]

 }

Where as, a few times same API is producing data with empty courses like below.

 {
     "type": "Plan",
     "programs":[
         {
            .....
            "courses":[]
         }
     ]

 }

Could you please give your thoughts on what scenarios can bring this kind of behaviour


DB: Postgres

Running in: Kubernetes, Memory: 1024M

Number of Rows retrieving from DB query: 505 rows

-- Hearaman
java
kubernetes
spring-boot

0 Answers