-
Notifications
You must be signed in to change notification settings - Fork 30
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
Issues: 455, 456, 458 - Timeouts and msgs #461
Conversation
Signed-off-by: Bruce Potter <bp@us.ibm.com>
…re 0. Issue 458: Lower default values of resourceChanges ttl and cleanupInterval Signed-off-by: Bruce Potter <bp@us.ibm.com>
db.run(AgbotAgreementsTQ.getNumOwned(compositeId).result.flatMap({ xs => | ||
val maxAgreements = ExchConfig.getInt("api.limits.maxAgreements") | ||
val getNumOwnedDbio = if (maxAgreements == 0) DBIO.successful(0) else AgbotAgreementsTQ.getNumOwned(compositeId).result // avoid DB read for this if there is no max | ||
db.run(getNumOwnedDbio.flatMap({ xs => | ||
logger.debug("PUT /orgs/"+orgid+"/agbots/"+id+"/agreements/"+agrId+" num owned: "+xs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if this debug message will be confusing to someone looking at logs for the case where maxAgreements and maxMessages will be 0. The log message will indicate that "num owned" will be 0 when in fact the code didn't check the value. Same comment for the places in NodeRoutes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch, i missed that one. I'll fix...
// Remove msgs whose TTL is past, then check the mailbox is not full, then get the node publicKey, then write the agbotmsgs row, all in the same db.run thread | ||
db.run(AgbotMsgsTQ.getNumOwned(compositeId).result.flatMap({ xs => | ||
db.run(getNumOwnedDbio.flatMap({ xs => | ||
logger.debug("POST /orgs/"+orgid+"/agbots/"+id+"/msgs mailbox size: "+xs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment for the debug message for mailbox size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix this too...
Signed-off-by: Bruce Potter <bp@us.ibm.com>
akka.http.server.request-timeout
to45s
maxMessagesInMailbox
andmaxAgreements
are0
which is default and means unlimited