Skip to content
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

A few pool improvements #1660

Merged
merged 5 commits into from
Dec 22, 2017
Merged

A few pool improvements #1660

merged 5 commits into from
Dec 22, 2017

Conversation

jrudolph
Copy link
Member

  • no unbounded response buffers, in a code comment I previously speculated whether buffering would be ok or not. I figured, probably unbounded buffering is not so cool so I removed it. Now the outgoing result is buffered in the slot until it is fetched
  • some additional failure handlers

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed validating PR that is currently being validated by Jenkins labels Dec 19, 2017
@akka-ci
Copy link

akka-ci commented Dec 19, 2017

Test PASSed.

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR that is currently being validated by Jenkins labels Dec 21, 2017
@akka-ci
Copy link

akka-ci commented Dec 21, 2017

Test PASSed.

}

override def onConnectionFailed(ctx: SlotContext, cause: Throwable): SlotState = {
ctx.debug("Connection failed.")
// FIXME: register failed connection attempt, schedule request for rerun, backoff new connection attempts
ctx.closeConnection()
ctx.dispatchFailure(ongoingRequest, cause)
Unconnected
// FIXME: register failed connection attempt, backoff new connection attempts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ticketify?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's basically #1391 but I'll add it to the comment.


eventually {
a[Throwable] should be thrownBy oneCycle()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the error message here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A timeout that a push / expect didn't go through because of backpressure. Hard to test otherwise.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing method is fine, just wondering if the message is understandable :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment.

Copy link
Member

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, one question

@jrudolph jrudolph force-pushed the jr/w/review-new-pool branch 2 times, most recently from d4202d2 to 478d8c0 Compare December 21, 2017 13:50
@akka-ci akka-ci added validating PR that is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed tested PR that was successfully built and tested by Jenkins validating PR that is currently being validated by Jenkins labels Dec 21, 2017
@akka-ci
Copy link

akka-ci commented Dec 21, 2017

Test FAILed.

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) labels Dec 21, 2017

eventually {
// should fail eventually because backpressure kicks in and one of the expects / pushes above will timeout
a[Throwable] should be thrownBy oneCycle()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

@akka-ci akka-ci added tested PR that was successfully built and tested by Jenkins and removed validating PR that is currently being validated by Jenkins labels Dec 21, 2017
@akka-ci
Copy link

akka-ci commented Dec 21, 2017

Test PASSed.

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed tested PR that was successfully built and tested by Jenkins labels Dec 21, 2017
@@ -34,6 +36,8 @@ private[pool] abstract class SlotContext {

def debug(msg: String): Unit
def debug(msg: String, arg1: AnyRef): Unit
def debug(msg: String, arg1: AnyRef, arg2: AnyRef): Unit
def debug(msg: String, arg1: AnyRef, arg2: AnyRef, arg3: AnyRef): Unit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}
final case class WaitingForResponse(ongoingRequest: RequestContext) extends ConnectedState with BusyState {
override def onResponseReceived(ctx: SlotContext, response: HttpResponse): SlotState =
WaitingForResponseDispatch(ongoingRequest, Success(response))

override def onConnectionFailed(ctx: SlotContext, cause: Throwable): SlotState =
WaitingForResponseDispatch(ongoingRequest, Failure(cause))
// connection failures are handled by BusyState implementations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for leaving those comments 👍

@ktoso
Copy link
Member

ktoso commented Dec 22, 2017

Looked at all commits one by one and changes look good. LGTM

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed tested PR that was successfully built and tested by Jenkins validating PR that is currently being validated by Jenkins labels Dec 22, 2017
@akka-ci
Copy link

akka-ci commented Dec 22, 2017

Test FAILed.

@jrudolph
Copy link
Member Author

PLS BUILD

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR that is currently being validated by Jenkins labels Dec 22, 2017
@akka-ci
Copy link

akka-ci commented Dec 22, 2017

Test FAILed.

@jrudolph
Copy link
Member Author

PLS BUILD

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR that is currently being validated by Jenkins labels Dec 22, 2017
@akka-ci
Copy link

akka-ci commented Dec 22, 2017

Test PASSed.

@jrudolph
Copy link
Member Author

Finally ;)

@jrudolph jrudolph merged commit 3d4ecc4 into akka:master Dec 22, 2017
@jrudolph jrudolph deleted the jr/w/review-new-pool branch December 22, 2017 12:39
@jrudolph jrudolph added this to the 10.1.0-RC1 milestone Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants