-
Notifications
You must be signed in to change notification settings - Fork 36
Replaced SimpleDateFormat with DateTimeFormatter wherever thread-critical #208
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
base: main
Are you sure you want to change the base?
Replaced SimpleDateFormat with DateTimeFormatter wherever thread-critical #208
Conversation
mgaffigan
left a comment
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 agree with changing:
- server/src/com/mirth/connect/client/core/api/providers/CalendarParamConverterProvider.java
- server/src/com/mirth/connect/plugins/serverlog/ServerLogItem.java
but the others are all allocated on the stack - and have no possibility for cross-thread use. Changing DateUtil in particular seems unnecessarily risky.
Also, is there a reason we're jumping to Apache FastDateFormat instead of Java 8 DateTimeFormatter?
9b1257e to
614b02e
Compare
…es only Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Signed-off-by: Nico Piel <nico.piel@hotmail.de>
…ngine#185) Signed-off-by: Nico Piel <nico.piel@hotmail.de>
This script is the main launcher for the Open Integration Engine (OIE)
server. It prepares the Java environment and executes the server launcher
JAR file.
The script automatically finds a compatible Java runtime (version 17+ by
default) by searching for a valid executable in the following priority order:
1. The OIE_JAVA_PATH environment variable.
2. The -java-cmd directive in the oieserver.vmoptions file or included
.vmoptions files. Must specify the path to the 'java' executable.
This is the preferred way to declare the desired version for running
the server and can be overridden by OIE_JAVA_PATH. Can be a relative
path from the location of this script.
3. The JAVA_HOME environment variable.
4. The 'java' command available in the system's PATH.
It also parses the 'oieserver.vmoptions' file to configure JVM options,
system properties (-D...), and classpath modifications.
Signed-off-by: Tony Germano <tony@germano.name>
Co-authored-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
Issue: OpenIntegrationEngine#2
Signed-off-by: Nico Piel <nico.piel@hotmail.de>
This addresses an upsert race condition that occurred when saving plugin properties (e.g., Data Pruner settings, third-party plugins) in environments with a read/write split database configuration where the read-only connection points to a replica. The Problem: The prior code attempted to determine whether to INSERT or UPDATE by first checking for the property's existence using the read-only database connection. Since updating all properties for a plugin involves deleting them all first, if this DELETE operation had not yet propagated to the replica, the read-only check would incorrectly indicate the property still existed. The Result: An UPDATE statement would be attempted, which would fail to match any rows (since the data had already been deleted from the primary) and silently return zero rows updated. This failure was not being checked, leading to data loss for the affected property. The Solution: This change eliminates the preliminary read check. It now attempts an UPDATE first. If the update affects zero rows, a guaranteed INSERT is performed. This pattern ensures atomicity and correctness regardless of replication latency. See https://sqlperformance.com/2020/09/locking/upsert-anti-pattern Issue: Innovar-Healthcare/BridgeLink#66 Signed-off-by: Tony Germano <tony@germano.name> Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net> Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net> Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Many of the extensions do not include external dependencies, but for consistency in the build file all extensions attempt to copy libs if they exist. The copy tasks were already to configured to not fail if there was an error copying the files (because the source dir does not exist in this case.) This change also sets the quiet option so that a warning is not produced in the build output on a copy error. Signed-off-by: Tony Germano <tony@germano.name> Signed-off-by: Nico Piel <nico.piel@hotmail.de>
Signed-off-by: Tony Germano <tony@germano.name> Signed-off-by: Nico Piel <nico.piel@hotmail.de>
2ce92e1 to
75644de
Compare
|
I agree with Mitch
The core Java DateTimeFormatter is rock solid. |
That's why it's implemented :) |
Solves #207