All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased - ReleaseDate
0.2.0-alpha.17 - 2024-12-01
- core/topology: add
Topology::set_node_no()
andTopology::node_no()
. - core/envelope: add
Envelope::request_id()
. - core/config: impl
FromStr
forSecret
(#135). - core/init: emit the
elfo_start_time_seconds
metric. - core/actor: implement
Display
forActorMeta
(#74). - network: add
idle_timeout
to detect and disconnect stuck connections (#137). - network: add the
turmoil
transport for testing distributed actors (#137).
- BREAKING core/node: remove
node
module,NodeNo
is moved toaddr
. - logger: use
/
as a delimiter between an actor's group and key (#74). - core/addr: expose the
addr
module. - core: generate
NodeNo
randomly if not provided. - network: don't force
safe-*
features of thelz4_flex
crate (#136). - configurer: send
UpdateConfig
unboundedly.
- core: update the
idr-ebr
crate to v0.3 to fix possible crash inContext::finished()
. - logger: replace the
atty
crate withIsTerminal
to fix cargo-audit warnings. - macros/msg: better go-to-definition via RA (#141).
- macros/message: irregular warnings about
non_snake_case
by RA. - configurer: apply own configuration on the fly.
0.2.0-alpha.16 - 2024-07-24
- core:
Context::status_kind
API, now actors can readActorStatusKind
from the context (#133). - core:
is_*
methods onActorStatusKind
for each variant (#133). - Specify MSRV as 1.76.
- logger: log truncation up to the
max_line_size
configuration parameter (#128). - core: directly accept never returning functions in
ActorGroup::exec()
(#127). - core/context: add
Context::unbounded_send(_to)
methods. - errors: add
From<SendError> for TrySendError
andSendError::{into_inner,map}
methods. - core/config: add the
system.mailbox.capacity
parameter to set the mailbox capacity. - core/context: add
Context::set_mailbox_capacity()
. - docs: expose all configs to the rustdoc.
- BREAKING core/mailbox: default capacity is
100
now. - BREAKING macros: remove the
network
feature (#127). - BREAKING core/message: remove
AnyMessage::upcast()
in favor ofAnyMessage::new()
(#127). - BREAKING core/envelope:
Envelope::message()
returnsAnyMessageRef
(#127). - core/mailbox: move to an intrusive MPSC queue greatly improving performance (#52).
- core/message: allow
AnyMessage
to be downcasted toAnyMessage
(#127). - core/message: stabilize
AnyMessage
andAnyMessageRef
(#127). - core/message: faster
AnyMessage
serialization (#127). - tracing: improve performance of
TraceId::generate()
. - dumping: remove unstable
Timestamp
.
- core/request: avoid all-request to multiple groups hanging in some cases (#127).
- core/config: catch panics during deserialization of user configs.
0.2.0-alpha.15 - 2024-05-13
- coop: expose
coop::consume_budget()
to call in long computations. See documentation of thecoop
module for details. - coop: prefer a time-based budgeting if the telemetry is enabled (#13).
- proxy: add
Proxy::try_send_to()
andProxy::request_to()
. - telemeter: support gzip.
- telemeter/openmetrics: expose units of registered metrics.
- telemeter: the
elfo_metrics_storage_shards
gauge metric.
- core: replace sharded-slab with idr-ebr to reduce contention on messaging.
- macros/msg: replace a chain of
is()
with type id to improve codegen. - telemeter: a new sharded-by-threads storage, it increases perf and dramatically reduces contention.
- telemeter: revise default DDSketch parameters. It improves stability for some cases.
- telemeter: rename the
Prometheus
sink toOpenMetrics
with aliasing. - telemeter: make preemption points to the merge process.
- core/init: stuck on startup if a config's deserialization fails (#125).
- telemetry: now
elfo_message_handling_time_seconds
doesn't include the time of task switching if an actor is preempted due to elfo's budget system. - telemetry: don't produce allocator metrics if not enabled.
- telemeter: validate quantiles (0.0..=1.0) in the config.
- core: get rid of a dirty hack preventing high CPU usage in case of the large number of responses (#41).
0.2.0-alpha.14 - 2024-02-27
- test:
unstable
features (#124). - macros/msg: allow unknown lints to avoid warnings on clippy before 0.1.76.
0.2.0-alpha.13 - 2024-02-26
- core: changed OOM prevention trigger (that gracefully shutdowns the service) from old
used > total * ratio
to newavail < total * (1 - ratio)
(#120).
- macros/msg: clippy
blocks_in_conditions
warnings.
0.2.0-alpha.12 - 2023-12-21
- BREAKING restarting: the default restart policy is
RestartPolicy::never()
now (#118). - restarting: linear backoff is replaced with exponential backoff (#118).
- restarting: the restart policy can be overridden through configuration (#118).
- deps: update
quanta
to v0.12,hyper
to v1 anderased-serde
to v0.4. - context: slightly improve performance of time measurements.
- utils: slightly improve performance of
RateLimiter
. - telemeter: handle only
GET /metrics
requests. - telemeter: rename the
address
config parameter tolisten
with alias to the old name. - context: added
Context::start_info
to retrieve information related to the start of the actor (#118).
- telemeter: avoid spawning tasks for a HTTP server, it improves common metrics.
0.2.0-alpha.11 - 2023-11-10
- network: DNS resolve for TCP transport.
- network: unrouted requests don't lead to infinite waiting anymore (#116).
- network: release routed if flow closed.
- network: reconnect a control connection in the case of one-way discovery.
- core: use the right slot's key to remove actors.
0.2.0-alpha.10 - 2023-10-11
- core: unstable
ActorGroup::stop_order()
to specify termination order. - network: support UDS (configured as
uds://path/to/socket
). - network: reconnect on failures.
- core: improve uniqueness of
Addr
between node restarts. - network: add connect, bind and handshake timeouts.
- network: concurrent connection establishing on listening nodes.
- network: avoid sending repetitive
CloseFlow
. - network: increase the window of routed flow if messages are lost.
- network: flow control bug in case of an unstable actor.
- configurer: avoid race condition with configs on startup (#109).
- core: forget tokens in duplicated envelopes (#110).
- core: check an address on slab accesses.
- telemeter: restart on error (#112).
0.2.0-alpha.8 - 2023-08-25
- message: support deserialization of AnyMessage (#107).
- logger:
tracing-log
events are now properly filtered by target whentracing-log
feature is enabled (#106).
0.2.0-alpha.7 - 2023-08-11
- supervisor: deadlock if a router returns
Outcome::Multicast
(#105). - supervisor: print the system config, not only the custom one.
0.2.0-alpha.6 - 2023-08-04
- network: initial implementation of distribution.
- macros: support
#[message(protocol = "X")]
. - macros: add
set_protocol!
. - messages:
SubscribeToActorStatuses::forcing()
.
- BREAKING errors: replace
RequestError::Closed(envelope)
withFailed
. - BREAKING message: check uniqueness of (protocol, name) pair.
- message: now
AnyMessage
implementsMessage
, but it's still hidden. - message: add
Message::{name,protocol,labels,upcast}
. - macros: improve error reporting.
- request: now
RequestError::Ignored
can be returned only if the envelope is received. - macros: allow generic requests in
msg!
:msg!(match e { (R, token) => .. })
. - network: notify the request sender on response decoding error (#102).
0.2.0-alpha.4 - 2023-07-06
- configurer: fix data race with empty mailbox (#97)
0.2.0-alpha.3 - 2023-07-05
- context: add
Context::set_restart_policy
to override a group's default restart policy (#48).
- BREAKING group: make the module private, reexport
TerminationPolicy
andRestartPolicy
(#48). - BREAKING core:
start
andtry_start
functions are moved toelfo::init
module (#95).
- init,configurer: allow to check configs without starting the system (#95).
0.2.0-alpha.2 - 2023-06-14
- logger: add
targets
section to the config (#92).
- BREAKING remove
system.logging.targets
section (#92).
0.2.0-alpha.1 - 2023-06-01
- BREAKING supervisor: actors discard
ValidateConfig
by default (#49, #87). - BREAKING configurer: rename
AnyConfig::new
intoAnyConfig::from_value
and mark it unstable (#90). - configurer: send
UpdateConfig
as a regular message instead of a request (#49, #90).
- mailbox: avoid data race between
Mailbox::close()
andMailbox::recv()
methods (#89).
0.2.0-alpha.0 - 2023-05-16
- messages:
Impossible
that cannot be constructed (#39).
- BREAKING all built-in actors are moved to the
batteries
module. - BREAKING source: move to dynamic sources, see the Actoromicon for details (#50).
- BREAKING context: make
Context::try_recv()
async, now it polls sources and respects an actor's budget (#24, #70). - BREAKING proxy: make
Proxy::try_recv()
async. - BREAKING rename
Schema
toBlueprint
. - BREAKING mark public system messages as "non_exhaustive" (#35).
- BREAKING stream: rename
Yielder
toEmitter
. - source: new sources are fair (#58).
- status:
Alarming
is logged withWarn
level instead ofError
. - deps: update
syn
to v2,sealed
to v0.5,quanta
to v0.11. - context: speedup
Context::recv()
up to 10%. - context: now
Context::(try_)send(_to)()
can be used with requests for "fire and forget" style (#15).
- init: ignore the first signal after OOM is prevented.
- BREAKING proxy:
non_exhaustive()
, it's hard to make it work with asynctry_recv()
. - BREAKING configurer: remove
TryReloadConfigs
, useReloadConfigs
instead. - BREAKING time: remove
Stopwatch
in favor ofDelay
. - Deprecated stuff:
tls
,Proxy::set_addr()
,RequestBuilder::from()
,Scope::addr()
, alsoactors
andtrace_id
modules.
0.1.40 - 2023-03-07
- dumper: add
Truncate
mode (#85). - dumper: add
rules
section to the config (#85). - dumper: add
log_cooldown
parameter (#85). - utils: add
likely()
andunlikely()
hints (#85). - scope: add
with_serde_mode
(#85).
- move to 2021 edition and v2 resolver (#42).
- configurer: update the
toml
crate to v0.7. - dumper: rename the
interval
parameter towrite_interval
(#85).
- message: use smallbox right way, speedup messaging.
- dumper: handle overflow right way (#83).
0.1.39 - 2022-11-22
- stuck_detection: a basic detector under the
unstable-stuck-detection
feature. - source:
impl Source for Option<impl Source>
(#82).
- pinger: avoid getting stuck during reconfiguration.
0.1.38 - 2022-09-09
- proxy: add
set_recv_timeout
method (#76). - utils: add
RateLimiter::reset
method. - telemetry:
per_actor_key
now can be a pair(regex, template)
.
- proxy: replace busy loop in recv with timer (#76, #77).
- utils: now period in
RateLimiter
is configurable.
- proxy: add the location of a caller to panics (#75).
- telemeter: make
elfo_metrics_usage_bytes
more accurate. - context: decrement a budget only when an envelope has been actually received.
- configurer: check up-to-date on SIGHUP right way.
- scope: calculate allocations of cloned scopes (#79).
0.1.37 - 2022-06-03
- context: now
elfo_message_handling_time_seconds
includes pseudo messages<Startup>
and<EmptyMailbox>
(#64). - routers: add
Outcome::GentleUnicast
andOutcome::GentleMulticast
(#65). - telemeter: support "global" metrics, produced outside the actor system (#43, #55).
- context: reduce the budget of
recv()
from256
to64
.
- mailbox: drop all messages in a mailbox once an actor terminates (#68).
- core:
ValidateConfig
,Terminate
andPing
doesn't cause spawning singletons (#63). - macros: make it possible to use
#[message]
inside functions (#69).
0.1.36 - 2022-05-13
- context: now
recv()
polls sources and the mailbox fairly (#57).
0.1.35 - 2022-03-23
- topology: unstable support for multiple runtimes.
- dumping: support
#[message(dumping = "disabled")]
. - context: run
task::yield_now()
after manyrecv()
calls to prevent starving other actors.
- message: use vtable directly instead of LTID.
0.1.34 - 2022-02-25
- dumping, dumper: add
thread_id
to dumps (as theth
field). - telemetry: produce
elfo_allocated_bytes_total
andelfo_deallocated_bytes_total
metrics (#3, #4, #5).
0.1.33 - 2022-02-07
- context: add
Context::try_send
. - errors: add
TrySendError::map
andRequestError::map
. - dumping: write
ts
firstly to support thesort
utility. - dumping: support multiple dump classes.
- dumping: expose unstable API for external dumping.
- dumper: extract a dump's name if it's not specified.
- dumper: support the
{class}
variable in config'spath
param. - dumper: don't dump large messages, configurable by
max_dump_size
param (64KiB by default). - telemeter: add
Retention::ResetOnScrape
policy as the simplest way to protect against stabilization with time. - scope:
try_set_trace_id
.
- telemeter: use
Retention::ResetOnScrape
by default.
- dumper: don't dump partially invalid messages. Previously, it could lead to file corruption.
- Avoid rare
invalid LTID
errors. - init: do not start termination if the memory tracker fails to read files.
0.1.32 - 2021-12-21
- stream: add
Stream::generate()
to generate a stream from a generator. - init: check memory usage and terminate the system gracefully if the threshold is reached (
90%
). - init: add the
elfo_memory_usage
metric. - tracing:
TraceIdValidator
to check incoming raw trace ids.
- init: rename to
system.init
and enable metrics for it. - The
trace_id
module is deprecated in favor oftracing
.
0.1.31 - 2021-12-09
- configurer: add the
TryReloadConfigs
request. - configurer: warn if a group is updating a config suspiciously long time.
- pinger: an actor group that pings other groups to detect freezes.
- context:
request(msg).from(addr)
is deprecated in favor ofrequest_to(addr, msg)
. - Actors reuse a message's trace id when start instead of generating a new one.
- Actors reuse
Terminate
's trace id after the mailbox is closed. - supervisor: restart actors with a linear backoff, starting immediately and with 5s step.
Ping
s are handled automatically now.
ActorStatusReport
s are dumped after incoming messages.
0.1.30 - 2021-11-29
elfo_busy_time_seconds
metric.- logging: add the
system.logging.targets
section to override logging options for specific targets.
- logging: replace
max_rate
withmax_rate_per_level
.
0.1.29 - 2021-11-09
MoveOwnership
to transfer ownership over messaging.- telemeter:
elfo_metrics_usage_bytes
metric.
- telemeter: render new counters with
0
value during scraping to avoid some problems.
- context: sending methods return an error if a message is discarded by all recipients. Previously, such messages can sometimes be considered as delivered.
- telemeter: close the server before termination.
0.1.28 - 2021-10-14
- Expose
ActorMeta
andActorStatusKind
. - Provide methods to inspect
ActorStatus
. SubscribeToActorStatuses
andActorStatusReport
messages.
- context:
Context::recv()
andContext::try_recv()
panics if called again after returningNone
. - logger: use
_location
and_module
instead of@location
and@module
. - logger: remove the cargo prefix from locations.
- telemeter: hide rendered metrics in dumps.
- dumping: responses are dumped with the
RequestName::Response
name.
- telemetry: emit metrics in
ctx.respond()
.
0.1.27 - 2021-09-27
- telemeter: remove duplicate actor_group/actor_key labels.
0.1.26 - 2021-09-27
- telemeter: periodically compact distributions between scrape requests.
- telemetry: preserve metrics per an actor key after respawning.
- dumper: update the config right way.
0.1.25 - 2021-09-24
- supervisor: remove an extra update of configs at startup.
- start: wait some time before exiting in case of errors at startup.
0.1.24 - 2021-09-23
- configurer: merge
[common]
section into all actor group's sections.
- A race condition that leads to
config is unset
at startup. - telemetry: do not panic if used outside the actor system.
0.1.23 - 2021-09-20
- Graceful termination.
- logging:
elfo_emitted_events_total
,elfo_limited_events_total
andelfo_lost_events_total
metrics. - logging: per group rate limiter, configurable via
system.logging.max_rate
(1000
by default). - dumping: per group rate limiter, configurable via
system.dumping.max_rate
(100_000
by default). - dumping:
elfo_emitted_dumps_total
andelfo_limited_dumps_total
metrics. - logger:
elfo_written_events_total
metric. - configurer: reload configs forcibly on SIGUSR2.
- group: add the
restart_policy
method to specify a restarting behaviour. - group: add the
termination_policy
method to specify a restarting behaviour. - proxy: add
Proxy::finished()
to await termination andProxy::close()
to close a (sub)proxy's mailbox. - dumping: add
dumping::hide()
to hide large fields.
- logger: a memory leak in case of a full channel.
- A new actor status:
Terminating
.
0.1.22 - 2021-09-13
- Set last versions of subcrates.
0.1.21 - 2021-09-13
- dumper: provide more detailed errors.
- Replace the
elfo_inactive_actors_total
metric with more commonelfo_actor_status_changes_total
one.
0.1.20 - 2021-09-09
- telemeter: interoperability with the
metrics
crate. - supervisor:
elfo_active_actors
,elfo_inactive_actors_total
,elfo_restarting_actors
metrics. - context:
elfo_message_waiting_time_seconds
,elfo_message_handling_time_seconds
,elfo_sent_messages_total
metrics. - dumping:
elfo_lost_dumps_total
metric. - dumper:
elfo_written_dumps_total
metric. - logger: add a filtering layer to control per group logging. Now it's possible to use
system.logging.max_level
under a group section in order to alter the filter settings.
- dumper: protect against serialization errors.
- tls: deprecated in favor of
scope
.
0.1.19 - 2021-08-24
- signal: add
signal::Signal
in order to work with signals. - configurer: reload configs on SIGHUP.
- logger: get spans back in order to enable filtering by
RUST_LOG
. - logger: reopen a log file on SIGHUP and when the config is changed.
- logger: add
format.with_location
andformat.with_module
options to append@location
and@module
fields to logs. - dumper: the dumping subsystem and an actor group to save messages on disk.
Message::NAME
andMessage::PROTOCOL
.
assert_msg!
: fix false positiveunreachable_patterns
warnings.msg!
: fix lostunreachable_patterns
warnings in some cases.msg!
: supportA | B | C
where components aren't units right way.- logger: support values containing
=
.
0.1.18 - 2021-06-23
- Expose the
tls
module to work with the task-local storage. - Mailboxes are now based on a growing queue instead of the fixed one.
- Increase the maximum size of mailboxes up to 100k messages.
0.1.17 - 2021-06-10
Proxy::sync()
: waits until the testable actor handles all previously sent messages.- Expose
time::{pause, resume, advance}
under thetest-util
feature. time::Stopwatch
.message(transparent)
.
- Do not panic in case of late
resolve()
calls forAny
requests.
0.1.16 - 2021-06-02
- docs: show features on docs.rs.
- Terminate/restart actors more accurately.
0.1.15 - 2021-05-31
- Requests that require only one response return the first successful instead of the last one.
0.1.14 - 2021-05-27
Proxy::addr()
0.1.12 - 2021-05-18
- Set last versions of subcrates.
0.1.11 - 2021-05-18
- logger: an actor group to log everything.
- Trace ID generation and propagation.
stream::Stream
: a wrapper to attach streams to a actor context.
- configurer: update system configs before user ones.
0.1.10 - 2021-05-14
Proxy::subproxy
.
- configurer: do not send
Ping
s.
0.1.9 - 2021-05-12
- configurer: nested config paths support (#1).
E.g. local topology name
gates.web
corresponds to the following TOML section:[gates.web]
. Context::group()
to get a group's address.
elfo::test::proxy
: a race condition at startup.
0.1.8 - 2021-05-06
Proxy::subproxy()
.
- Deprecate
Proxy::set_addr()
.
0.1.7 - 2021-05-06
Proxy::set_addr()
.
0.1.6 - 2021-04-20
#[message]
: add thepart
attribute.
- supervisor: log using a group's span.
- configurer: print a group name with errors.
assert_msg(_eq)!
: print unexpected messages.
0.1.5 - 2021-04-15
- Actually print error chains.
0.1.4 - 2021-04-15
- Print causes of
anyhow::Error
.
0.1.3 - 2021-04-08
msg!
: supporta @ A
pattern.
0.1.2 - 2021-04-08
msg!
matches againstenum
s.- Add
Proxy::send_to()
to test subscriptions.
- Fix race condition at startup.
- Fix casts of panic messages.
- Update startup mechanics.
Local<T>
implementsDebug
even ifT
doesn't.msg!
acceptsA | B
patterns.
0.1.1 - 2021-04-03
- Add the "full" feature.
- Move
configurer
to a separate crate.
0.1.0 - 2021-04-03
- Feuer Frei!