bahir-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From emlaver <...@git.apache.org>
Subject [GitHub] bahir pull request #49: BAHIR-130
Date Thu, 24 Aug 2017 15:10:28 GMT
Github user emlaver commented on a diff in the pull request:

    https://github.com/apache/bahir/pull/49#discussion_r135042956
  
    --- Diff: sql-cloudant/src/main/scala/org/apache/bahir/cloudant/common/JsonStoreDataAccess.scala
---
    @@ -125,6 +125,19 @@ class JsonStoreDataAccess (config: CloudantConfig)  {
         val clRequest: HttpRequest = getClRequest(url, postData)
     
         val clResponse: HttpResponse[String] = clRequest.execute()
    +          
    +    //BAHIR-130 start
    +    //In cloudant Lite number of requests pre second are limited.
    +    //Just wait and try again
    +    clResponse.code match {
    +        case 429 => {
    +            Thread sleep 1000
    --- End diff --
    
    Also, would be good to have logging for:
    - When there's too many requests and attempting a retry with x seconds
    - Any problems/interrupt during the 'backoff' wait time


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message