Skip to content

Commit

Permalink
Recover from serialization failures (#5591)
Browse files Browse the repository at this point in the history
An exception encountered during serialization prevents engine from continuing because it enters an infinite loop(!).

# Important Notes
The aim of this PR is to make it possible for engine to recover from the serialization failures. Any failure would mean that we enter an infinite loop in deserialization which is in turn waiting for the serialization to finish (which will never happen).
In this particular case FQNs are [referencing concrete modules](#5037). A separate PR will address that.
  • Loading branch information
hubertp authored Feb 9, 2023
1 parent 472580d commit 53b3de1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@
- [Convert large longs to doubles, safely, for host calls][4099]
- [Profile engine startup][4110]
- [Report type of polyglot values][4111]
- [Engine can now recover from serialization failures][5591]

[3227]: https://github.com/enso-org/enso/pull/3227
[3248]: https://github.com/enso-org/enso/pull/3248
Expand Down Expand Up @@ -650,6 +651,7 @@
[4099]: https://github.com/enso-org/enso/pull/4099
[4110]: https://github.com/enso-org/enso/pull/4110
[4111]: https://github.com/enso-org/enso/pull/4111
[5591]: https://github.com/enso-org/enso/pull/5591

# Enso 2.0.0-alpha.18 (2021-10-12)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,20 @@ class SerializationManager(compiler: Compiler) {
case e: NotSerializableException =>
logger.log(
Level.SEVERE,
s"Could not serialize module [$name]."
s"Could not serialize module [$name].",
e
)
throw e
case e: Throwable =>
logger.log(
Level.SEVERE,
s"Serialization of module `$name` failed: ${e.getMessage}`",
e
)
throw e
} finally {
finishSerializing(name)
}
finishSerializing(name)
}

/** Sets the module described by `name` as serializing.
Expand Down

0 comments on commit 53b3de1

Please sign in to comment.