This document lists the new features, enhancements, fixed issues and, removed or deprecated features for Hazelcast IMDG 3.12.x release. The numbers in the square brackets refer to the issues in Hazelcast's GitHub repositories.

==== 3.12.4 ====

1. Enhancements

- Added support for the `PartitionLostListener` configuration
on the client side. [#15762]

2. Fixes

- Fixed an issue where the query was ignoring the index
but was processing successfully. [#15808]
- Fixed an issue where the predicate queries to retrieve
multi-values were failing on the nested JSON objects in arrays. [#15789]
- Fixed a possible livelock when many threads were trying to
use the `incrementMod()` method causing an infinite loop. [#15777]
- Fixed shutting down Management Center service caused by
an NPE when MultiMap statistics are gathered after
`MultiMapService.shutdown()`. [#15656]


==== 3.12.3 ====

1. Enhancements

- Added a new implementation of SecondsBasedEntryTaskScheduler for the FOR_EACH mode to improve the performance of TransactionContext.commit(). [#15586]
- Improved the client graceful shutdown mechanism so that its tasks are executed before marking a client as inactive. [#15565]
- Added sent/received bytes logs for each ProtocolType into the diagnostics. [#15541]
- Improved the performance of TransactionLog.add() by avoiding the LinkedList.remove() call. [#15435]
- To be shown on Management Center, the clients now send both its IP address and canonical hostname. Before, only the hostname of the client was shown. [#15421]
- Added the support for nested JSON objects in the arrays. [#15368]

2. Fixes

- Fixed an issue where the node.isMaster() method could cause inconsistent behaviors when it is executed during a partition service lock. [#15618]
- Fixed an issue where Management Center was not able to see the 3.12.2 members (members with CP subsystem enabled) after performing a rolling upgrade from Hazelcast IMDG 3.11.4 to 3.12.2. 'ManagementCenterService' was shutting down and throwing an exception when a CP-subsystem-enabled member was trying to report to Management Center for the first time. [#15621]
- Made PagingPredicate a VisitablePredicate so the optimizer is able to visit its inner predicate to optimize it or to select an index to evaluate the inner predicate with. [#15602]
- Fixed an issue where CP subsystem restarts were not being canceled or waited the running/scheduled discovery tasks. Otherwise, two different discovery tasks could overlap and run concurrently or one of the discovery tasks could run in a corrupted state. [#15568]
- Fixed an issue where the cleaner task for expired records was logging the exceptions during migrations: the log level for PartitionMigratingException has been set to FINEST. [#15543]
- Fixed an issue where the executor service message task was blocking the partition thread. [#15526]
- Fixed an issue where normalFramesRead and priorityFramesRead were never incremented as seen in the diagnostic logs. [#15479]
- Fixed an issue where the readBackupData and statisticsEnabled options were not respected when a new map configuration is dynamically added from a client to a running Hazelcast cluster. [#15392]
- Fixed an issue where a lock was required when registering metrics on the happy path. [#15378]
- Fixed an issue where some updates to the entries got lost from the write behind queue: It was a concurrency issue when there are updates to CoalescedWriteBehindQueue while StoreWorker is running. [#15060]

==== 3.12.2 ====

1. Enhancements 

* Enabled the REST endpoints for the `cluster.sh`, `cp-subsystem.sh` and
`healthcheck.sh` scripts to use HTTPS. Before, they were
using HTTP. See the cluster.sh, cp-subsystem.sh and healtcheck.sh sections.
* Introduced complete example configurations (XML and YAML) for
Hazelcast Java client and client failover. See the Configuring Declaratively section.

2. Fixes

* Fixed an issue where the `UNKNOWN` current runtime version in
the `JavaVersion.isAtLeast()` method was not handled properly.
To avoid having runtime functionality, that relies on
this method, broken with each new major Java release, `UNKNOWN`
as a detected current runtime version is now considered to be at least any
other version. [#15362]
* Updated the `JavaVersion` class to support JDK 13 and 14 builds. [#15354]
* Fixed the deserialization filtering for Externalizables and Deadlock in the
map index. The deserialization filter was not properly protecting against the
vulnerable Externalizable classes. The filtering has been extended. [#15346]
* Fixed an issue where the comparators were not able to act on both keys and values.
A custom paging predicate comparator may act on keys and values at the
same time even if only the keys are requested, e.g., using the `IMap.keySet()`
method. Before this fix only the keys were fetched for this method, making
comparators unable to act on values. [#15324]
* Fixed an issue where the locked entries with a time-to-live were not evicted.
With this fix, the lock operation checks if an entry has already expired. [#15310]
* Fixed an issue where the named scheduled tasks was not respecting
the `HazelcastInstanceAware` marker. [#15233]
* Fixed an issue where storing `MapStore` instances in `MapStoreConfig`
could cause member failures when the configuration is added
dynamically: When you configure the map store by the class name
and start Hazelcast with this configuration, the `MapStoreConfig#implementation`
field was altered to store the reference to the `MapStore` instance
created by Hazelcast (this meant that someone can access the created map store
instance via `MapStoreConfig#getImplementation()`). With this fix,
`MapStoreConfig` behavior has become aligned with other data structures' configuration,
i.e., it is not altered anymore and if you did not set anything as `implementation`
then `MapStoreConfig#getImplementation()` returns `null` after Hazelcast is started.
Also, this fix eliminates the side effects with the
dynamically added map configurations, potentially breaking this functionality
for the maps with map stores configured. [#15225]
* Fixed an issue where IMap's `localLockedEntryCount` metric was not considering
the entries with null values. [#15218]
* Fixed a possible `NullPointerException` for the `remove` variable in
`DeafultRecordStore`. [#15217]
* Fixed an issue where an executor was serialized multiple times when it
is sent to multiple members by a Java client. Now, it is serialized
only once as expected. [#15007]
* Fixed an issue where the WAN consistency check and synchronization was
getting stuck when requested on a `PASSIVE` cluster: WAN consistency
check and WAN synchronization performed on a cluster in the `PASSIVE`
state was keeping the WAN synchronization state at `IN_PROGRESS` even
after the cluster state has set to `ACTIVE`.
This was preventing serving future consistency check and synchronization requests.
This fix allows WAN replication, consistency check and
WAN synchronization while the source cluster is in the `PASSIVE` state. [#2968]

==== 3.12.1 ====

1. New Features

* Added support for updating the licenses of all the running
members of a Hazelcast IMDG cluster using the REST API. See the License Information section.

2. Enhancements

* Introduced complete example configurations (XML and YAML) for
Hazelcast Java client and client failover. See the Configuring Declaratively section.
* Updated Hazelcast JCache implementation to support
JCache 1.1.1. This version of JCache does not introduce new
functionalities; it resolves the errata and issues in JCache 1.1.0. See the Upgrading to JCache 1.1.1 section.

The following are the other improvements performed to solve the enhancement
issues opened by the Hazelcast customers/team.

* Improved Config#getConfigurationUrl()'s Javadoc to mention
that it returns `null` if the `Config` instance has been built from
a source different than URL or file. [#15109]
* Improved the Raft snapshotting so that the old log entries are not
kept when there is no follower with an unknown match index.[#15068]
* Updated the client failover XSD to include `targetNamespace` that
has been delivered with Hazelcast IMDG 3.12. [#15057]
* Updated the Hazelcast Kubernetes dependency to the latest version. [#14899]
* Added the getter method for the YAML configuration builder properties. [#14884]
* Eliminated the excessive logging when NIO networking is shutdown by
deregistering the IO threads. [#14837] 
* Introduced a warning log for illegal reflective access operation when
using Java 9 and higher, and OpenJ 9. [#14835]
* Updated the Hazelcast web session manager dependency to the latest version. [#14822]
* Improved the force start mechanism for Hot Restart so that only the
subdirectories and files under the base Hot Restart directory are now deleted
(not the base directory). #2997
* Updated the Netty version to fix the unknown signature algorithm
issues in BoringSSL integration. #2907
* Added Maven's animal sniffer plugin to check the JDK 6 compatibility. #2906

3. Fixes

* Fixed an issue where the queries like `labels[any] = 0` and `labels[any] = 1`
were optimized only to `false` since `labels[any]` was interpreted as a
regular attribute name having a single value.[#15138]
* Fixed an issue which was causing `OutOfMemoryException` in a
split-brain situation, due to the client listeners. [#15042]
* Fixed the authentication mechanism between the clients and members
by adding a check to prevent re-verification while the client is changing
its owner member. [#15015]
* Fixed an issue where the Hazelcast IMDG configuration files, that
have an extension other than `.xml`, `.yaml` or `.yml` or do not have
an extension, were ignored silently. This was happening
when the configuration file is set by using the `hazelcast.config` [#14945]
* Some operations such as heartbeat checks and partition
migrations share common threads with the client login module.
In case of the long running client login module implementations,
some symptoms such as split brain syndrome can be seen. This has
been fixed by introducing a blocking executor which is used only
for the client JAAS authentications. [#14957]
* Fixed an issue where the client was not considering the new
address of a restarted member, which has the same UUID but could
have a different IP address after it is restarted. [#14843]
* Fixed an issue where the migration operations were running
before the previous finalization is completed. [#14834]
* Fixed an issue where the data loaded by Hot Restart was not being
recognized after a Merkle tree synchronization. #2960
* Fixed an issue where the WAN queues were not reset during
a split-brain healing which caused duplicate WAN events to be
enqueued and WAN counters to be broken. #2947

==== 3.12 ====

1. Breaking Changes

* Support for JDK 6 and 7 has been dropped. The minimum Java version that Hazelcast supports now is Java 8. See the Supports JVMs section.

2. New Features

Hazelcast IMDG Enterprise New Features:

* **Blue-Green and Disaster Recovery for Java Clients:** Introduced the support for Hazelcast Java clients to switch between alternative clusters. See the Blue Green Deployment and Disaster Recovery section.

Hazelcast IMDG Open Source New Features:

* **CP Subsystem:** Implementing the https://raft.github.io/[Raft consensus algorithm], Hazelcast introduces its CP subsystem which runs within a Hazelcast cluster and offers linearizable implementations of Hazelcast's concurrency APIs. See the CP Subsystem chapter.
* **Querying JSON Strings:**  You can now query JSON strings stored inside your Hazelcast clusters. See the Querying JSON Strings section.
* **Pipelining:** Introduced pipelining mechanism using which you can send multiple requests in parallel to Hazelcast members or clients, and read the responses in a single step. See the Pipelining section.
* **Support for Multiple Endpoints When Configuring Member’s Networking:** Added the ability to configure the Hazelcast members with separate server sockets for different protocols. See the Advanced Network Configuration section.
* **YAML Configuration Support:** Added the support for configuring Hazelcast in YAML. See the Configuring Declaratively with YAML section.

3. Enhancements

Hazelcast IMDG Enterprise Enhancements:

* **Sharing Hot Restart `base-dir` among Multiple Members:** The base directory for the Hot Restart feature (`base-dir`) is now used as a shared directory between multiple members, and each member uses a unique sub-directory
inside this base directory. This allows using the same configuration on all the members. Previously, each member had to use a separate directory which complicated the deployments on cloud-like environments. During the restart, a member tries to lock an already existing Hot Restart directory inside the base directory. If it cannot acquire any, then it creates a fresh new directory. See the Configuring Hot Restart section.
* **Lower Latencies and Higher Throughput in WAN Replication:** Improved the design of the WAN replication mechanism to allow configuring it for lower latencies and higher throughput. See the Tuning WAN Replication For Lower Latencies and Higher Throughput section.
* **Add/Remove WAN Publishers in a Running Cluster:** Introduced the ability to dynamically add or remove WAN publishers (target clusters). See the Dynamically Adding WAN Publishers section.
* **Automatic Removal of Stale Hot Restart Data:** Introduced an option that allows the stale Hot Restart data to be removed automatically. See the description of the `auto-remove-stale-data` configuration element in the Configuring Hot Restart section.
* **Client Permission Handling When a New Member Joins:** Introduced a declarative configuration attribute `on-join-operation` for the client permission in the Security configuration (its programmatic configuration equivalent is the `setOnJoinPermissionOperation()` method). This attribute allows to choose whether a new member joining to a cluster will apply the client permissions stored in its own configuration, or will use the ones defined in the cluster. See the Handling Permissions When a New Member Joins section.
* **Automatic Cluster Version Change after a Rolling Upgrade:** Introduced the ability to automatically upgrade the cluster version after a rolling upgrade. See the Upgrading Cluster Version section.
* **FIPS 140-2 Validation:** Hazelcast now can be configured to use a FIPS 140-2 validated module. See the FIPS 140-2 section.

Hazelcast IMDG Open Source Enhancements:

* **Client Instance Names and Labels:** You can now retrieve the names of client instances on the member side. Moreover, client labels have been introduced so that you can group your clients and/or perform special operations for specific clients. See the Defining Client Labels section.
* **Composite Indexes:** Introduced the ability to recognize the queries that use all the indexed properties and treat them as a composite, e.g., `foo = 1 and bar = 2 and foobar = 3`. See the Composite Indexes section.
* **REST Endpoint Groups:** With this enhancement you can enable or disable the REST API completely, Memcache protocol and REST endpoint groups. See the Using the REST Endpoint Groups section.

The following are the other improvements performed to solve the enhancement issues opened by the Hazelcast customers/team.

* Improved the YAML configuration so that you can configure multiple WAN member sockets. [#14800]
* Members now fail fast when the `max-idle-seconds` element for the entries in a map is set to 1 second. See the note in the Configuring Map Eviction section for this element. [#14697]
* Removed group password from the Hazelcast’s default XML configuration file. Also improved the non-empty password `INFO` message. It's now only logged if security is disabled, password is not empty and password is not the Hazelcast default one. [#14603]
* Improved the code comments for the `HazelcastInstance` interface. [#14439]
* Improved the Javadoc of `HazelcastClient` so that the code comments now use "unisocket client" instead of "dumb client". [#14213]
* Added the ability to perform an LDAP `subtree` search for groups in Hazelcast Management Center’s LDAP authenticator. [#14118]
* Added the ability to set the `EvictionConfig.comparatorClassName()` in the client’s declarative configuration, too. [#14093]
* Introduced the `/ready` endpoint to the REST API to allow checking a member if it is ready to be used after it joins to the cluster. [#14089]
* Improved the syncing of XSD files. [#14070]
* The `IMap.removeAll()` method now supports `PartitionPredicate`. [#12238]
* Improved the diagnostics tool so that it automatically creates the configured directory for the diagnostic outputs. [#11946]

4. Fixes

* Fixed an issue where the state of member list on the clients were broken after a hot restart in the cluster. [#14839]
* Fixed an issue where the outbound pipeline was not waking up properly after merging the write-through changes. [#14830]
* Fixed an issue where a Hazelcast Java client was not able to connect to the cluster (which has the `advanced-network` configuration) after a split-brain syndrome is healed. [#14768]
* Fixed an issue where the `like` and `ilike` predicates didn’t catch any entity with the `text` field containing the '\n' character. [#14751]
* Fixed an issue where ``NullPointerException``s was thrown recursively when a client is connected to an unreachable member during a split-brain. [#14722]
* Fixed an issue where Hazelcast running on RHEL (OpenJDK8) shows `unknown gc` in the logs, instead of `major gc` and `minor gc`. [#14701]
* Fixed an issue where the IP client selector was not working for the local clients. [#14654]
* Fixed the wording of a misleading error in the first attempt to connect to a wrongly configured cluster. The error message has been changed to “Unable to connect to any cluster”.  https://github.com/hazelcast/hazelcast/issues/14574[[#14574]]
* Fixed an issue where a connection configured using `AdvancedNetworkConfig` was not denied correctly for some inappropriate endpoints. [#14532]
* Fixed the REST service which was not working when the REST endpoint is configured for `AdvancedNetworkConfig`. [#14516]
* Fixed an issue where the `setAsync()` method was throwing `NullPointerException`. [#14445]
* Fixed an issue where the collection attributes indexed with `[any]` were causing incorrect SQL query results, if the first data inserted to the map has no value for the attribute or the collection is empty. [#14358]
* Fixed an issue where the REST API was not handling the HTTP requests without headers correctly: when a client sends an HTTP request without headers to the Hazelcast REST API, the `HttpCommand` class was wrongly expecting an additional new line. [#14353]
* Fixed an issue where `QueryCache` was not returning the copies of the found objects. [#14333]
* Fixed an issue where the MultiMap's `RemoveOperation` was iterating through the backing collection, which caused performance degradation (when using the `SET` collection type). [#14145]
* Fixed an issue where the user code deployment feature was throwing `NullPointerException` while loading multiple nested classes and using entry processors. [#14105]
* Fixed an issue where `mapEvictionPolicy` couldn’t be specified in the JSON configuration file. [#14092]
* Fixed an issue where the rolling upgrade was failing when all members change their IP addresses. [#14088]
* Fixed an issue where the resources were not wholly cleared when destroying `DurableExecutorService` causing some resources to be left in the heap. [#14087]
* Fixed an issue where the newly joining members could not form a cluster when the existing members are killed. [#14051]
* Fixed an issue where the `IMap.get()` method was not resetting the idle time counter when `read-backup-data` is enabled. [#14026]
* Fixed an issue where the `addIndex()` method was performing a full copy of entries when a new member joins the cluster, which is not needed. [#13964]
* Fixed an issue where the initialization failure of `discoveryService` was causing some threads to remain open and the JVM could not be terminated because of these threads. [#13821]
* Fixed the discrepancy between the XSD on the website and the one in the download package. [#13011]
* `PagingPredicate` with comparator was failing to serialize when sending from the client or member when the cluster size is more than 1. This has been fixed by making the `PagingPredicateQuery` comparator serializable. [#12208]
* Fixed an issue where `TcpIpConnectionManager` was putting the connections in a map under the remote endpoint bind address but not under the address to which Hazelcast connects. [#11256]
* Fixed an issue where a restarted member cannot join to the active cluster when `hot-restart-persistence` and `auto-remove-stale-data` are enabled. [#2842]
* Fixed an issue when a member emits lots of ``AddWanConfigIgnoredEvent``s after receiving a request to add WAN configuration. [#2838]
* Fixed an issue where `wan-endpoint-config` under `advanced-network` does not work properly when the member is bound to more IP addresses, e.g., when NAT is used. [#2808]
* Fixed an issue where the connection to Memcache endpoint configured with SSL was throwing `NullPointerException`. [#2783]
* Fixed an issue where `EvictBatchBackupOperation` was throwing a `ClassCastException` for High-Density Memory Store lazy  entry view. [#2780]
* Fixed an issue where the Memcache endpoint from `AdvancedNetworkConfig` was expecting `CLIENT` protocol with Hazelcast IMDG Enterprise sources. [#2778]
* Fixed an issue where Hazelcast couldn’t start and threw `NullPointerException` when SSL in `AdvancedNetworkConfig` is configured. [#2755]
* Fixed an issue where the partition migration was throwing exceptions due to the serialization of `PublishCompletedMigrationOperation`. [#2771]


5. Removed/Deprecated Features

* `ILock` interface and implementation of `ILock` has been deprecated, and `FencedLock` has been introduced.
* The original implementations of `IAtomicLong`, `IAtomicReference`, `ISemaphore` and `ICountDownLatch` have been deprecated. Instead, the implementations provided by the CP Subsystem have been introduced.
* The following system properties are deprecated:
  ** `hazelcast.rest.enabled`
  ** `hazelcast.mc.url.change.enabled`
  ** `hazelcast.memcache.enabled`
  ** `hazelcast.http.healthcheck.enabled`


