Commit graph

78 commits

Author SHA1 Message Date
Auto Format
75579bed17 format source with scalafmt, #26511 2019-03-15 10:23:46 +01:00
Patrik Nordwall
c676735a3b
Merge pull request #26301 from jrudolph/jr/26300-Unregistered-DeadLetter-logging
=act #26300 try not to get stopped by death pact before Unregistration is complete
2019-03-15 09:59:48 +01:00
Auto Format
ce404e4f53 format source with scalafmt 2019-03-11 16:58:55 +01:00
Patrik Nordwall
5c96a5f556 replace unicode arrows
* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
2019-03-11 16:58:51 +01:00
Johannes Rudolph
b908f01b59
=act #26300 try not to get stopped by death pact before Unregistration is complete
Otherwise, there will be noisy DeadLetter logging and also the ordering guarantee
that we try to hold up that the connection actor is not closed before the channel
is violated.
2019-01-29 14:29:43 +01:00
kerr
bdc90052aa Update headers from 2018 to 2019 once for all. (#26165)
* Add CopyrightHeader support for sbt-boilerplate plugin.
* Add CopyrightHeader support for `*.proto` files.
* Add regex match for both `–` and `-` for CopyrightHeader.
* Add CopyrightHeader support for sbt build files.
* Update copyright from 2018 to 2019.
2019-01-02 11:55:26 +01:00
Johannes Rudolph
7899708ca6
=act #25733 close channels from SelectionHandler and force flushing from selector
This is needed because starting from JDK 11 all platforms will only finally
close a channel when it is flushed from a selector.

Fixes #25733.
2018-12-04 12:03:18 +01:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04:00
Johan Andrén
d3b625616a
Generate file to use instead of assuming class loader type #23902
Makes the test pass on JDK 9 where the class loader assumption is not correct anymore.
2018-02-14 10:29:53 +01:00
Christopher Batey
009214ae07
Update copyright to 2018 (#24241) 2018-01-04 17:26:29 +00:00
Arnout Engelen
4bdccd416f Make sure connections are aborted correctly on Windows #19611 2017-06-01 09:32:58 +02:00
Johannes Rudolph
38c9fff219 =act #13861 report cause for Akka IO TCP CommandFailed events
To stay compatible this needs to be hacked into CommandFailed using a
mutable var.
2017-05-16 15:22:11 +02:00
Patrik Nordwall
de27c18469 Replace FileInputStream and FileOutputStream, #22733
(because they use finalize that is not gc friendly)
2017-04-19 12:05:19 -05:00
Johannes Rudolph
e915a16dbc =act #22568 reduce spurious ResumeReading log messages
ResumeReading will likely end up in DeadLetters when the connection is
torn down at the same time as the user tries to read more data from the
connection.

For the same reason ResumeReading may arrive in peerSentEOF state. We
ignore it here to get rid of "unhandled message from Actor ... : ResumeReading"
warnings.

This will remove the spurious warnings in these cases.
2017-03-15 16:48:20 +01:00
Philippus Baalman
6c7085252a extended copyright into 2017 2017-01-04 17:37:15 +01:00
Björn Antonsson
c66ce62d63 Update to a working version of Scalariform 2016-06-02 22:12:36 +02:00
Johan Andrén
62e30b3c08 Update copyrights and links to the new company name #19851 2016-02-23 12:58:39 +01:00
Prayag Verma
b7783968a0 =pro #19068 All copyrights ranges and single years updated to a range ending in 2016 2016-01-25 10:20:30 +01:00
Endre Sándor Varga
b27e5fbb4e =act: TCP actor should unwatch handler/commander after Close
(cherry picked from commit 9578d46)
2015-07-08 12:16:50 +02:00
Patrik Nordwall
b30e460be7 = #17342 Make 2.4 binary compatible with 2.3
(cherry picked from commit 89af8bdb90)

* remove final identifier in serializers

i* revert/deprecate ProtobufSerializer.ARRAY_OF_BYTE_ARRAY

* adding back compatible empty constructor in serializers

* make FSM.State compatible

* add back ActorPath.ElementRegex

* revert SocketOption changes and add SocketOptionV2
  see a6d3704ef6

* problem filter for ActorSystem and ActorPath

* problem filter for ByteString

* problem filter for deprecated Timeout methods

* BalancingPool companion

* ask

* problem filter for ActorDSL

* event bus

* exclude hasSubscriptions

* exclude some problems in testkit

* boundAddress and addressFromSocketAddress

* Pool nrOfInstances

* PromiseActorRef

* check with 2.3.9

* migration guide note

* explicit exclude of final class problems
2015-05-11 21:11:52 +02:00
Julian Tescher
00f6a58e7c Changes all occurances of Typesafe copyright to extend to 2015 2015-03-10 14:12:19 -07:00
Patrik Nordwall
83d75528ee =act #16653 swallow exception from setTcpNoDelay
* some versions of netcat (`nc -z`) doesn't allow setTcpNoDelay

(cherry picked from commit c4ca93eec652c31f48b7203999dc8b27c3ebc70a)

Conflicts:
	akka-actor/src/main/scala/akka/io/TcpConnection.scala
2015-01-28 09:30:20 +01:00
drewhk
8cd0286774 Merge pull request #16267 from drewhk/wip-15991-tcp-pendingwrite-fix-forward-port-drewhk
=act #15991 delay sending of ACK until .. (forward port)
2014-11-10 17:16:32 +01:00
Endre Sándor Varga
3a2f4e14d4 =tcp #15766: Workaround for Windows to detect TCP abort
(cherry picked from commit 9340215)
2014-11-10 15:35:08 +01:00
Johannes Rudolph
b4c82b8cdf =act #15991 delay sending of ACK until we have updated pendingWrite
Otherwise, the user-level actor may already have sent the next chunk before
the pendingWrite has been updated and the TcpConnection will reject it.
(cherry picked from commit 96758e6)
2014-11-10 15:30:17 +01:00
drewhk
b88c964bd4 Merge pull request #15573 from spray/w/fix-TCP-pull-mode
=act #15572 don't read recursively in pullMode when a complete buffer was read
2014-07-28 10:19:19 +02:00
Johannes Rudolph
1e0b61a160 =act #15572 don't read recursively in pullMode when a complete buffer was read 2014-07-24 11:02:08 +02:00
Michael R. Maletich
a6d3704ef6 !act #13490 Changed the callback to SocketOption to accept a channel instead of a Socket, this allows for using the nio features.
For example in Java 7 you can now join a multicast group:

case class JoinGroup(group: InetAddress, networkInterface: NetworkInterface) extends SocketOption {

  override def afterConnect(c: DatagramChannel): Unit = {
    c.join(group, networkInterface)
  }
}

  IO(Udp) ! Udp.Bind(self, new InetSocketAddress(MulticastListener.port),
    options=List(ReuseAddress(true),
      JoinGroup(MulticastListener.group, MulticastListener.interf)))

Other minor changes:

 - changed all methods in SocketOption to take a Channel instead of a Socket.  The socket can be gotten from the Channel but not the reverse.
 - all methods that are called before the bind are now called beforeBind for consistency.
 - All network connections now call the beforeBind and afterConnect.
2014-07-22 20:22:53 -05:00
Björn Antonsson
8beea8ee77 =act #15265 Enable OP_READ interest for pullMode early ResumeReading 2014-05-30 13:56:35 +02:00
Björn Antonsson
40384ae21f =act #15265 Make TcpConnection handle Suspend/ResumeReading while waiting for Register 2014-05-27 16:14:48 +02:00
dario.rexin
2cbad298d6 =all #3858 Make case classes final 2014-03-07 13:20:01 +01:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
drewhk
1db16428da Merge pull request #1909 from drewhk/wip-io-read-throtting-drewhk
+act #3586 #3807 Implement mandatory read throttling
2014-01-17 11:53:23 -08:00
Endre Sándor Varga
487083a9c3 +act #3586 #3807 Implement mandatory read throttling 2014-01-17 18:27:56 +01:00
Patrik Nordwall
a11fb1dafc =act #3572 Add parens to sender
* because it is not referentially transparent; normally we reserved parens for
  side-effecting code but given how people thoughtlessly close over it we revised
  that that decision for sender
* caller can still omit parens
2014-01-17 18:21:14 +01:00
Johannes Rudolph
972284ce71 =act 3571 quiet down exceptions from Socket.shutdownOutput()
Backport from this spray commit:

e4068046a5
2013-10-22 17:20:24 +02:00
Johannes Rudolph
3da7f4ee07 =act #3680 fix SuspendReading being overruled by racy ChannelReadable 2013-10-21 15:33:31 +02:00
Johannes Rudolph
f87f166aac =act #3672 fix garbling of big outgoing Tcp.Write caused by mixup of buffers 2013-10-17 14:25:02 +02:00
Mathias
85c771d731 !act #3581 Add Tcp.CompoundWrite, some cleanup
Moves `def ack: Event` and `def wantsAck: Boolean` from the `Tcp.WriteCommand` type down to the newly introduced `Tcp.CompactWriteCommand`, which breaks existing code depending on these.
Additionally `Tcp.WriteCommand` now has a few additional methods (`+:`, `++:`, prepend) and a companion object.
2013-09-26 12:19:28 +02:00
Endre Sándor Varga
b566e9393d =act, rem, clu #3521: make serialize-messages work with core modules 2013-08-27 11:05:54 +02:00
Roland Kuhn
b044b6b5a9 Merge pull request #1548 from spray/wip/io-fix-configured-noacks
io: fix rare bug in TcpConnection causing the sending of certain `NoAck`...
2013-06-20 04:57:10 -07:00
Mathias
b311e9e700 io: change IOException treatment from "fatal error" to "expected during normal operation"
Up to now IOExceptions during reading, writing or connecting were treated as
fatal actor errors, crashing the connection actor and thus producing ERROR
level log messages. This patch treats such exceptions as "expected" during
normal operation and prevents them from crashing the actor. Rather, they are
logged at DEBUG level and the actor is actively and cleanly stopped.
2013-06-20 10:22:47 +02:00
Mathias
f2ab463c4d io: fix TcpConnection acking empty writes which carry NoAck(...) markers 2013-06-20 10:11:10 +02:00
Patrik Nordwall
9b59187816 tone down error logging in IO layer, see #3386
* Made defaultDecider available in SupervisorStrategy,
  turned out that I didn't need it but I think it could be
  good anyway, e.g.
  override def supervisorStrategy = OneForOneStrategy(
    enableLogging = false)(SupervisorStrategy.defaultDecider)
* Verified the following scenarios:
  - client connection failure
  - server bind failure
  - kill client (peer closed)
  - kill server (peer closed)
2013-05-31 14:32:08 +02:00
Mathias
0e0a95ff95 io: remove SelectionKey lookup and reduce IO-layer-internal message volume 2013-05-13 14:14:49 +02:00
Björn Antonsson
539df2e98a Enforce mailbox types on System actors. See #3273 2013-05-03 11:05:32 +02:00
Roland
0e34edbcb3 implement ResumeWriting, see #3200
also included:
- a complete rewrite of the TCP docs based on real/tested/working code
  samples
- an EchoServer implementation which handles all the edge cases,
  available in Java & Scala
- renamed StopReading to SuspendReading to match up with ResumeReading
- addition of Inbox.watch()
- Inbox RST docs for Java(!) and Scala

not included:
- ScalaDoc / JavaDoc for all IO stuff
2013-04-18 15:05:48 +02:00
Patrik Nordwall
9e56ab6fe5 Disallow re-joining, see #2873
* Disallow join requests when already part of a cluster
* Remove wipe state when joining, since join can only be
  performed from empty state
* When trying to join, only accept gossip from that member
* Ignore gossips from unknown (and unreachable) members
* Make sure received gossip contains selfAddress
* Test join of fresh node with same host:port
* Remove JoinTwoClustersSpec
* Welcome message as reply to Join
* Retry unsucessful join request
* AddressUidExtension
* Uid in cluster Member identifier
  To be able to distinguish nodes with same host:port
  after restart.
* Ignore gossip with wrong uid
* Renamed Remove command to Shutdown
* Use uid in vclock identifier
* Update sample, Member apply is private
* Disabled config duration syntax and cleanup of io settings
* Update documentation
2013-04-17 16:48:18 +02:00
Roland Kuhn
cdf717e855 Merge pull request #1321 from spray/wip-IO-WriteFile-rebased
Tcp: introduce WriteFile to support zero-copy writing of files, fixes #2896
2013-04-17 04:39:41 -07:00
Johannes Rudolph
c342edee48 TcpConnection: forward exception from WriteFile dispatcher to the actor for proper handling 2013-04-15 15:03:02 +02:00