6.11.1 (1 October 2024)
Fixes in 6.11.1
C Client
DIF-2538: API_ERROR_DIFFUSION_VALUE_INCORRECT_DATATYPE when reading double value
When using read_diffusion_double_value to read a DIFFUSION_VALUE_T containing a double value, it would return API_ERROR_DIFFUSION_VALUE_INCORRECT_DATATYPE. This issue has now been fixed.
Federation
DIF-2727: Spurious Reverse Remote Server log messages - PUSH-000882 and PUSH-000888
When running in a cluster the message PUSH-000882 (indicating that a server has become the master for primary initiator remote server connections) was logged even if no such remote servers are configured.
In addition, PUSH-000888 (indicating that the server is no longer the master for primary initiator remote server connections) even if the server was not the master or if it has no primary initiators configured.
This has been resolved so that these messages are now only logged in situations where they actually apply.
DIF-2731: Potential Deadlock when using Remote Server Reverse Connections
A thread deadlock could occur between RemoteServerManagerImpl and DefaultPicoContainer when closing a server that has remote server secondary acceptors defined and a primary server tries to connect to it at the same time. This has now been resolved.
Java Client
DIF-2740: Deadlock when using RecoverableUpdateStream and set fails
In previous versions a deadlock could occur when using recoverable update streams. This has been resolved at this release.
Server
DIF-2686: Replicated topics restored condition notified too early
In rare conditions, the readiness condition that allows a connector to conditionally start on the 'replicated topics restored' condition can be notified before all topics have been correctly resolved leading to a transient incorrect state being exposed to subscribers. This has now been resolved.
Topics
DIF-2640: Redundant value updates can be published to subscribers during recovery
In some circumstances, during cluster recovery, the same value of a topic could be published twice. This has now been resolved.
DIF-2781: Topic set selectors are incorrectly combined with existing selectors
In previous releases, set selectors were incorrectly merged with existing selectors, potentially incorrectly subscribing sessions to topics. This could also have a serious performance impact when using set selectors. The bug has been fixed in this release.
6.11.0 (21 August 2024)
Improvements in 6.11.0
Apple Client
DIF-1493: Subscribe and Unsubscribe Methods using Topic Selectors
Methods to subscribe to and unsubscribe from topics using a topic selector have been added to Apple SDK API
C Client
DIF-44: C SDK now compatible with arm64 architecture for Apple
C SDK is now compatible with MacOS Apple Silicon when using arm64 library version
Client
DIF-1107: Fetching Topic Sizes
It is now possible to fetch the sizes of topics using the Topics.fetch feature. This is implemented in the Java, JavaScript and .NET SDKs and sizes are also displayed in the Diffusion Management Console. In Java, this is enabled using the new withSizes() method on the FetchRequest builder.
DIF-1136: Ability to turn delta compression off for Update Streams
It is now possible to suppress delta generation in update streams (In Java, .NET and JavaScript SDKs).
Disabling delta compression can reduce the CPU workload at the client at the cost of increased bandwidth and possible additional CPU load on the server (if the topic publishes deltas). This may be particularly useful for topics that have PUBLISH_VALUES_ONLY set.
DIF-1198: MissingTopicNotification proceed and cancel methods removed
The proceed and cancel methods on the MissingTopicNotification have been no-ops since 6.6 and were deprecated at that release. They have now been removed. Any calls to these methods in existing code can safely be removed.
DIF-4: New 'Environment' session property
A new fixed session property, 'Environment', has been added at this release. This value will only be present for clients using 6.11 SDKs (or later) and will have a value indicating the platform and version the client is running, e.g. 'NODE_20.9.0'
DIF-778: New Session Event Listener
A new cluster-aware session event listener has been added to the ClientControl feature at this release. It replaces the previous session properties listener which only worked for a single server. As well as reporting on all sessions across a cluster it also provides the following additional functionality:-
1) It is possible to specify that only notifications for sessions that satisfy a specified session filter are received.
2) It is possible to report only on sessions that started after a specified time.
3) It is possible to register more than one listener for a single session.
See API documentation for full details.
At this release, the feature is available in Java, JavaScript, and .NET SDKs.
DIF-967: Session Properties Listeners are Deprecated
Session Properties Listeners have now been deprecated in favour of the new Session Event Listeners.
DIF-968: Legacy Session Properties Listener Method Removed
The setSessionPropertiesListener method in the ClientControl feature that did not use CompletableFutures was deprecated in release 6.7 and has been removed in this release as well as the SessionPropertiesListener interface that supported it.
Configuration
DIF-144: Default Maximum Message Size Increased to 256KiB
The default maximum message size as configured in Server.xml has been increased from 32KiB to 256KiB.
DIF-2145: XML Confguration and Server Configuration API Removals
The following methods (deprecated at 6..5) have been removed from the server configuration API:-
ThreadPoolConfig.setCoreSize
ThreadPoolConfig.getCoreSize
ThreadPoolConfig.setMaximumSize
ThreadPoolConfig.getMaximumSize
ThreadPoolConfig.setKeepAlive
ThreadPoolConfig.getKeepAlive
ValidationPolicyConfig.isSubscription
ValidationPolicyConfig.isConnection
The following elements (deprecated at 6.5 or before) have been removed from the configuration XSDs and can no longer be specified:-
Server.xsd
thread-pool-definition.core-size
thread-pool-definition.max-size
thread-pool-definition.keep-alive
thread-pool-definition.rejection-handler-class
security.authorisation-handler-class
auto-deployment
Statistics.xsd
statistics.topic-statistics
statistics.reporters
client-statistics.monitor-instances
Console
DIF-1521: Download button on log viewer
The Diffusion management console log viewer now allows users to download the whole of the current log file.
DIF-1522: Structural browser for JSON values
The Diffusion console now provides a different editor component for JSON values, which allows users to browse the structure of the JSON data.
DIF-2152: Diffusion Management Console Improvements
The Diffusion console is subject to numerous smaller changes and quality of life improvements, including a redesigned topic view editor, integrated code examples, improvements to handling of large topic values, more inline documentation and more consistent field validation behaviour.
DIF-378: Topic view editor upgrades
The Diffusion console tools for defining topic views have been overhauled, with a new step-by-step view to improve navigability and a multi-line direct editor for advanced users. The old interface is still available but will be removed in a future release.
Federation
DIF-10: Fanout is Deprecated
The fanout feature is deprecated at this release. The Remote Servers feature, along with topic views should be used in preference.
It is possible to achieve the same functionality as fanout using a topic view with a specification that maps from a remote server to <path(0)>.
DIF-1698: Remote subscription memory footprint reduced
The product has been optimised to reduce the memory required to maintain remote subscriptions on both the primary and the secondary server
Java Client
DIF-185: DataType now supports validation and delta operations against serialized values
Two methods have been added to the DataType class which work directly on serialized values, removing the need to deserialize a value first. serializedBinaryDeltaType() provides delta calculation support, and validate(Bytes) allows serialized values to be validated. These methods have been introduced for internal use within Diffusion, and are unlikely to be useful to application code.
JavaScript Client
DIF-2252: JavaScript SDK Removals
The deprecated `Session.sessionID` string property has been removed in favour of `Session.sessionId` of type `SessionId`. If a session ID string is required, use `Session.sessionId.toString()`
The deprecated call signature of `RemoteServers.createRemoteServer(name: string, url: string, principal: string, credentials: Credentials, connectionOptions?: Partial<ConnectionOptions>)` has been removed in favour of `RemoteServers.createRemoteServer(remoteServer: RemoteServerDefinition)`.
The deprecated `TopicAddFailReason.INVALID_PATH` has been removed.
DIF-349: Make exception types explicit throughout the client
For parity with the Java client, exceptions thrown by API functions have been typed as subclasses of the native JavaScript `Error` type. Exceptions have been documented throughout the API.
DIF-858: Buffer and process have been deprecated
The use of `Buffer` has been deprecated throughout the JavaScript client. Use the browser compatible `Uint8Array` instead.
Licensing
DIF-2036: Usage Monitor
At this release, a new usage monitoring feature has been introduced. This provides customers with the ability to collect certain usage statistics in files that may then be sent to DiffusionData periodically so that their usage of the product can be assessed. This allows DiffusionData to have a far better view of how the product is being used and provide customers with feedback on their usage which can improve the overall product experience. This capability will be rolled out to selected customers shortly and will be determined by the licence that is issued. For full details on how to operate a usage-monitored server see the user guide.
Python Client
DIF-2155: New remove_stream functionality
It is now possible to remove a stream handler from the Python client registry, by calling the remove_stream method of Topics object returned by `diffusion.session.Session.topics`.
DIF-25: Fetch Query capabilities for Python SDK
This implements Fetch Queries, which allows the fetching and conversion of individual values with or without accompanying topic properties based on various constraints such as topic types.
This feature uses and supports the IBytes and Bytes types introduced to the Python client in a recent change. Note that Diffusion time series value types are not specifiable by fetch requests in current clients, and the Python client follows this behaviour for consistency. Accordingly, in order to request a TimeSeries you must specify a TimeSeries of Bytes, and then decode the value by requesting properties and using read_as with the according TIME_SERIES_EVENT_VALUE_TYPE in the returned properties in a given TopicResult.
Replication
DIF-1565: Diffusion support for Hazelcast autoconfiguration on Kubernetes is deprecated
The kubernetes-enabled setting in Replication.xml has been deprecated at this release and will be removed in a future release. The official Hazelcast feature should be used in preference.
DIF-401: Support for non-replicated topics in a cluster has been deprecated
The ability to specify which topics are replicated in a cluster is deprecated in this release. The default is to replicate all topics.
The ability to limit which topics are replicated was there to support a legacy feature which is no longer part of the product. Restricting which topics are replicated can lead to problems where there are different topics on different nodes within the cluster and the setting should not be used.
The 'topics' element in Replication.xml is deprecated at this release and will be removed in a future release.
Server
DIF-1000: Improved Input Thread Pool Balancing
The server uses a single thread from the configured inbound thread pool to process all input for a given session. In previous releases, the thread was assigned at random. From this release, the thread is assigned sequentially, making better use of the available threads.
DIF-345: Major improvement in distributed update performance
In previous releases the performance of updates in a clustered environment was significantly slower than for a single server.
At this release asynchronous partition and persistence file logging techniques have been employed so that the ingress performance when applying updates to a cluster is comparable with that of a single server.
DIF-815: Improved performance when sessions repeatedly closing with large topic tree
In previous releases, repeatedly opening and closing sessions against a server with a large number of topics caused a unnecessary processing to be carried out by the server multiplexer threads, leading to poor system performance. The processing has been optimised in this release.
Sessions
DIF-1206: New 'matches' Comparison for Session Filtering
Session filters (which can be used in various APIs for selecting sessions) now have a new 'matches' comparison which allows session property values to be checked against a regular expression, thus providing more powerful selection capability.
Topic Views
DIF-1506: Topic View Scalar Path Mapping Extension
At this release a new second parameter has been added to the topic views scalar directive. This allows the scalar value to be obtained from a topic at a specific point in the branch being processed rather than from the source topic being evaluated. Using this mechanism allows parts of the target reference topic path to be derived from topics higher up the branch from the topic being processed which can be useful for enabling all topics in a branch to be copied to a target branch without a dependency on the source topic for the path part. See the user guide for full details.
DIF-1636: Single value topic mapping to time series in a cluster is deprecated
The mapping of single value topics to time series topics in a cluster is deprecated at this release. This is because its use will lead to time series reference topics with different numbers of events and different metadata across the cluster. If a topic view is detected that maps a single value topic to a time series topic in a cluster a single error will be logged for the view.
Mapping single value topics to time series topics in a non-clustered environment is still supported but a warning will be logged as previous time series events within the reference topics will be lost if the server is restarted.
Fixes in 6.11.0
.NET Client
DIF-1177: Client ignores maximum message size set by user
The Dotnet client ignored the maximum message size set by the user. This has been fixed.
DIF-1196: GetSessionProperties does not throw NoSuchSessionException
Calling GetSessionProperties for a session that has been closed did not throw NoSuchSessionException. This has been fixed.
DIF-238: Authentication Control example throws exception before completing
If SetAuthenticationHandlerAsync is called with await then creating a session throws SessionEstablishmentTransientException before the authenticator is called. This has been fixed.
DIF-36: Unable to use 'and' method with two value constraints
When using the update constraints API there was an issue where it was not possible to use 'and' composition with two value comparison constraints. For example, it was not possible to say 'value GT 5' and ' value LT 10'. This has now been resolved. The relaxation of validation does mean that it is now technically possible to define a constraint that could never evaluate to true - for example 'value EQ 5' and 'value NE 5' so it is up to the user to ensure constraints are possible.
DIF-63: SessionClosedException thrown when not in closed state
If timeout occurs during reconnection the client can hang. This has been fixed.
A connection attempt does not timeout if there is no response from the server. This has been fixed.
Connection and reconnection failure will transition the session state to CLOSED_FAILED.
Android Client
DIF-2: Android Client Sessions are Categorised as Java Client
In previous versions, Android and Java clients were both categorised as 'JAVA' in the session properties. From this release, Android clients are categorised as 'ANDROID'.
Apple Client
DIF-1560: Apple SDK unable to decode 16 Bit Float
The Apple SDK raised "Parsing of type 25 is unhandled." when attempting to parse a 16-bit floating point. This issue has now been resolved.
DIF-1642: iOS SDK Stability of PTDiffusionRequestStreamRegistry and PTDiffusionTopicRoutingStreamRegistry
Several improvements were made to PTDiffusionRequestStreamRegistry and PTDiffusionTopicRoutingStreamRegistry
DIF-1710: iOS crash in PTDiffusionConversation openWithConversationId:
NSInternalInconsistencyException was being raised in PTDiffusionConversation when the session disconnected while the App was in the background. This issue has been resolved.
DIF-36: Unable to use 'and' method with two value constraints
When using the update constraints API there was an issue where it was not possible to use 'and' composition with two value comparison constraints. For example, it was not possible to say 'value GT 5' and ' value LT 10'. This has now been resolved. The relaxation of validation does mean that it is now technically possible to define a constraint that could never evaluate to true - for example 'value EQ 5' and 'value NE 5' so it is up to the user to ensure constraints are possible.
DIF-779: Missing Session State Listener
The Session State Listener was missing from PTDiffusionSessionConfiguration. This issue has been fixed.
DIF-797: Invalid URL string when opening a session in the Apple SDK raises uncaught NSInvalidArgumentException
When an invalid URL string is passed when opening a session a NSInvalidArgumentException is raised.
In Objective-C we can trap it, but in Swift it’s not possible resulting in an uncaught exception that crashes the application. This has been fixed.
DIF-847: Reconnection Timeout closes successfully recovered connection
When a successful reconnection occurred, the reconnection timeout was not properly cleared and resulted in a disconnection. This issue has been resolved.
C Client
DIF-36: Unable to use 'and' method with two value constraints
When using the update constraints API there was an issue where it was not possible to use 'and' composition with two value comparison constraints. For example, it was not possible to say 'value GT 5' and ' value LT 10'. This has now been resolved. The relaxation of validation does mean that it is now technically possible to define a constraint that could never evaluate to true - for example 'value EQ 5' and 'value NE 5' so it is up to the user to ensure constraints are possible.
DIF-58: Missing on_subscription callback for stream causes SEGV
When on_subscription or on_value handlers are omitted from a value stream, a segmentation fault would occur. This issue has now been resolved.
Configuration
DIF-146: Difficulty Setting Maximum Message Size for Docker Containers
It is often a requirement to set the maximum message size to something other than the default, especially when using Docker containers. It is now possible to override the Server.xml maximum message size by setting a system property or environment variable called diffusion.max.message.size to the required maximum message size specified in bytes.
Console
DIF-178: Confusing displays for licences without connection limits
Licences without hard connection limits could previously display an incorrect message on the network overview tab of the console.
DIF-180: Topic views errors do not show the correct column position
The console topic view editor provided incorrect column information when presenting syntax error feedback for topic views.
DIF-792: Metrics table can fail to pad collector metrics correctly
When a metrics table is displaying metrics from multiple collectors with different numbers of dimensions, rows for those collectors with fewer dimensions are incorrectly shifted left by one or more columns.
Gateway
DIF-1595: Connected Gateway Adapters only showing in a Console connected to one Cluster Member
Connection of Gateway Adapters was only showing in a console connected to one member of a cluster and not the others. Adapters would only be visible on a console that was connected to the cluster member that was the partition 0 owner. This problem has now been resolved and adapters will be visible on a console connected to any member of a cluster.
Java & Android Client
FB-30709: Unable to use 'and' method with two value constraints
When using the update constraints API there was an issue where it was not possible to use 'and' composition with two value comparison constraints. For example, it was not possible to say 'value GT 5' and ' value LT 10'. This has now been resolved. The relaxation of validation does mean that it is now technically possible to define a constraint that could never evaluate to true - for example 'value EQ 5' and 'value NE 5' so it is up to the user to ensure constraints are possible.
Java Client
DIF-1826: Invalid data errors with a shared value stream cause IllegalStateExceptions
Invalid data received for a topic is reported to the application using the ValueStream.onError() callback. Invalid data errors occur if the update API sends incompatible binary data to a topic that has its VALIDATE_VALUES topic property set to false, or due to a bug in Diffusion (there is no known such bug at this time).
Streams can be associated with multiple topic subscriptions. If onError() is called for a topic, no further events will be delivered to the stream, even for other topics. Due to a bug in previous releases, if an invalid data error occurred for a topic, subsequent events for the other topics would cause an IllegalStateException to be logged as an uncaught exception. The bug has been fixed in this release.
DIF-36: Unable to use 'and' method with two value constraints
When using the update constraints API there was an issue where it was not possible to use 'and' composition with two value comparison constraints. For example, it was not possible to say 'value GT 5' and ' value LT 10'. This has now been resolved. The relaxation of validation does mean that it is now technically possible to define a constraint that could never evaluate to true - for example 'value EQ 5' and 'value NE 5' so it is up to the user to ensure constraints are possible.
DIF-684: API calls that expect a class identifying a Diffusion data type do not fail if an invalid class is supplied
In previous versions, API calls that take a value class parameter could quietly fail if an unsupported class was supplied. At this release, value classes are validated and an exception is thrown if they are not a valid Diffusion data type or a superclass of one.
JavaScript Client
DIF-20: Javascript API has no mechanism for setting trusted certificates
Additional options have been added to diffusion.connect, allowing modification of the underlying TLS configuration. The new options are passed directly to tls.createSecureContext()
DIF-36: Unable to use 'and' method with two value constraints
When using the update constraints API there was an issue where it was not possible to use 'and' composition with two value comparison constraints. For example, it was not possible to say 'value GT 5' and ' value LT 10'. This has now been resolved. The relaxation of validation does mean that it is now technically possible to define a constraint that could never evaluate to true - for example 'value EQ 5' and 'value NE 5' so it is up to the user to ensure constraints are possible.
DIF-479: Shared session has initialising state immediately after connecting
Shared sessions would return the connected session before updating the state to connected. This could lead to a new session to appear to still be in the `initialising` state. The order of internal state updates has been corrected. A new session will now reliably be in `connected` state.
Logging
DIF-2532: Errors logged on server closedown
Error messages could be logged in the server log from the class FileRecordWriterImpl when the server is closing down. This has now been resolved.
DIF-834: Existing PUSH message numbers changed at 6.10
Some of the PUSH message numbers, as documented in the user manual changed their meaning between 6.9 and 6.10. For example, PUSH-000882 had a different meaning at 6.10 than at 6.9. All numbers from PUSH-000880 were incorrectly assigned.
This has now been resolved.
Persistence
DIF-1536: Edit events of persisted replicated time series topics are not recovered from file persistence
Due to a bug in previous releases, edit events of replicated time series topics would not be correctly recovered from file persistence. If a cluster was restarted, the edit events and their corresponding original events would be silently discarded. The bug has been fixed in this release.
Python Client
DIF-1062: Diffusion Core shows console noise on console at startup
Coverage instrumentation code had accidentally been left in the release version of `diffusion-core`, occasionally causing warnings to be emitted on stdout/stderr. This new version removes this instrumentation code.
DIF-1162: ListEncoder.read uses Byte for length instead of Int32
This fix resolves an issue with list serialisation in the Python Client, due to the representation of length being given by a byte rather than a 32 bit integer, preventing lists larger than 255 items being serialised or deserialised correctly. The features formerly affected include: Topic/Session Metric Collector lists, Conjunction Constraints lists, Branch Mapping lists, Range Query event lists, Error Report lists and Session Tree branch lists at the time of discovering this bug.
DIF-1612: Internal type conversion code allows conversion to/from BinaryDataType, no IBytes representation available
This is a breaking API change, fixing the representation and implementation of the Diffusion datatype hierarchy. It introduces the IBytes base type, which all Diffusion datatypes are a subclass of, and a Bytes type (new to the Python client, and not representative of a specific Diffusion datatype).
Previously the concept of IBytes (being convertible to bytes and from any Diffusion data type, regardless of source/destination) was conflated with the Binary data type, which was incorrect. In practice, the places where this may affect the end user, requiring an application code change are as follows:
1. In a range query, resulting in no data being returned, as the server would reject a request for BinaryDataType data, as was the default type for a Range Query in diffusion.features.timeseries.TimeSeries.range_query (https://docs.diffusiondata.com/docs/6.10.2/python/api/timeseries.html#diffusion.features.timeseries.TimeSeries.range_query).
2. When subscribing to Binary data types, when data may have been converted to Binary before, it will not now, as only Time Series of BinaryDataType can be converted to BinaryDataType (existing BinaryDataType streams were and will continue to be provided to subscribers when requested).
DIF-2054: Setuptools no longer accepts 'tools.setuptools.dynamic.readme.content_type' key, change to 'content-type'
Setuptools no longer accepts 'tools.setuptools.dynamic.readme.content_type' key, which was being used in earlier version of the Diffusion Python Client. This has been changed to 'content-type' as per Setuptools' requirements. This should only affect build processes rather than end user experience, as pip installs the generated wheel rather than relying on the pyproject.toml, nor does it need the README.MD, but this bug report is included for completeness.
DIF-2127: Incorrect set deserialisation
Set data structures were being deserialised incorrectly, by fetching more elements than were declared for a set. This only manifested when there was more data in a protocol message after the given set, otherwise deserialisation ends when there is no more data. The only known, currently implemented Python Client features this could have adversely affected are as follows:
1. list_session_metric_collector - due to group_by_properties being a set of String objects.
DIF-2550: 'no running event loop' due to API breakage in aiohttp
Fixes the 'no running event loop' issue due to breaking behavioural changes backported into aiohttp 3.10 (see https://github.com/aio-libs/aiohttp/issues/8555).
DIF-30: No support for Python 3.10-12
The Python client now supports Python versions 3.8-3.12 on MacOS (arm64 and x86_64), Windows and any x86_64 Linux distribution supported by the Manylinux project (https://github.com/pypa/manylinux).
DIF-33: Python SDK does not support SSL context for WSS
Previously the Python SDK did not support setting the SSL context for a WebSocket secure connection. This has now been resolved.
Replication
DIF-149: Error while handling a multiplexer event - IllegalStateException: Has already connected
In previous release, when new servers joined a cluster, a server could log a stack trace with the error message "IllegalStateException: Has already connected". This is harmless, but overly concerning. From this release, the error message will no longer be logged.
DIF-1574: Memory leak caused by session data retention
Over some time it could be observed that memory usage was increasing and class histograms showed client session-related objects (e.g. ClientInfo and SessionData) numbering far more than the number of connected sessions. This problem has now been resolved.
DIF-1761: Inefficient replication of topics with small deployment
In prior releases a 2 cpu deployment of Diffusion server had inefficient replication threading. This has been resolved in this release.
DIF-2575: Shutting down a server can discard writes to the file recovery log
In previous releases, the most recent persistent file store writes could be lost when a server is shut down, resulting in lost topic data. This has been fixed in this release.
DIF-404: Thread gets blocked when another cluster member is killed
Fixed a rare issue with non-blocking replication that could cause a server to block new topic updates indefinitely.
Security
DIF-1123: Permissions not correctly reevaluated on removal
There was a problem where in certain circumstances the removal of path permissions from a role was not correctly re-evaluated. This has now been resolved.
DIF-2287: Role permissions not correctly updated for inherited roles
There was a problem with inherited roles whereby if the permissions of a role were changed whilst the server was running, the permissions applied to other roles that included that role would not be re-evaluated until the server was restarted. This has now been resolved.
Server
DIF-1023: Corruption of client queue index can cause unnecessary CPU use
Due to a bug in previous releases, long lived sessions that subscribed to many different topics could perform unnecessary processing. The bug has been fixed in this release.
DIF-1058: Starting a cluster with inconsistent persistence files can cause nodes to have inconsistent topic trees
It was possible for a cold start of a cluster to result in Diffusion members with an inconsistent view of the topic tree. This is now fixed.
DIF-132: Excess CPU use with idle connections on Windows
In previous releases, when running on the Windows operating system it was possible to cause high CPU in certain extreme conditions. Part of the initialisation of Diffusion now detects it is running on Windows and sets a suitable default back-off value for an internal component avoiding high CPU usage.
DIF-1546: Topic removal service can return incorrect number of topics removed
In previous releases there were circumstances in which the server could report that the user had removed more topics than had actually been removed. This has been resolved at this release.
DIF-175: Errors creating metrics samples - occurs during a period of quorum minimum cluster not met
Downgraded logging of failures during metrics generation from error to warning.
DIF-1759: Deadlock when session closed prevents multiplexer processing
Due to a bug in previous releases, session close processing could deadlock the server. The bug has been fixed in this release.
DIF-1853: Failure to acquire SessionLock
Due to a bug in previous releases, a server belonging to a cluster could have incorrect session lock state, preventing sessions from acquiring session locks that should be available. The bug has been fixed in this release.
DIF-1856: NullPointerException in Server when empty string supplied as separator to Topic View
In previous releases, it was not possible to use an empty string for a topic view separator clause. Doing so would provoke a NullPointerException in the server logs. This has been fixed at this release.
DIF-1874: Performance issues when sessions are repeatedly closed with a large topic tree
In previous releases, repeatedly opening and closing sessions against a server with a large number of topics caused a unnecessary processing to be carried out by the server multiplexer threads, leading to poor system performance. The processing has been optimised in this release.
DIF-1962: Session location properties not provided when connecting through proxies
In previous releases if a client connected through a proxy or load balancer the CLIENT_IP session property could be set to a comma-delimited string of IP addresses. This in turn led to the location properties (COUNTRY, LANGUAGE etc) not being set. The CLIENT_IP session property will now be set to the originating client as documented, thus resolving this issue.
DIF-1975: NullPointerException warning logged by HTTP long polling session
In previous releases, a Java session using HTTP long polling could log a NullPointerException when failing to establish a connection. The problem has been fixed in this release.
DIF-2294: Possible thread deadlock in RemoteServerSubscriptionQueueImpl
In previous releases, a thread deadlock could occur between RemoteServerTopicManagerImpl/RemoteServerSubscriptionQueueImpl when closing down. This has now been resolved.
DIF-2517: DiffusionQuorumStartupCheck does not always log when quorum is met
The log message (PUSH-000753) which is logged when a quorum has been met would sometimes not be logged if the quorum was met immediately. This has now been resolved.
DIF-513: Update CAS failure after killing cluster member
When using a cluster with a quorum a Diffusion instance could reject further updates if another instance was restarted. This issue has now been resolved.
DIF-556: Multiplexers can encounter errors when topics are updated during partition recovery
In a rare situation during cluster reconfiguration an update to a replicated topic could fail to be sent to clients. This has been fixed.
DIF-917: Server can fail to accept updates at a high rate
Due to a bug in previous releases, a server could fail to accept updates at a high rate (more than tens of thousands of updates a second). The bug has been fixed in this release.
DIF-981: addAndSet does not respect topic OWNER for MODIFY_TOPIC permission
Updating an existing topic with TopicUpdate.addAndSet required MODIFY_TOPIC permission even if the specification was unchanged. Permissions for updates with addAndSet are now aligned with those for TopicUpdate.set.
Session Trees
DIF-608: Range queries fail on timeseries topics exposed through session trees
An attempt to perform a range query on a topic exposed by session trees would fail with "Range query failed because topic 'xxx' does not exist.". This has now been resolved so that range queries can be performed on session tree time series topics.
Topic Views
DIF-1537: Time series topic edit events are not correctly mapped through topic views
Due to a bug in previous releases, time series edit events could fail to be reflected through some types of topic view. The bug has been fixed in this release.
DIF-1850: Inefficient topic view indexing
In previous releases, Topic View indexing interned data which was inefficient. This has been resolved in this release.
DIF-1854: Deadlock between UniversalTopicImpl and DerivedReferenceTopicImpl when using topic views that create reference topics as children of source topics
In certain circumstances, a thread deadlock could occur between UniversalTopicImpl and DerivedReferenceTopicImpl. The most likely situation to provoke this would be a topic view that creates a reference topic that is a child of the source topic being processed by the view. This has been resolved in this release.
DIF-1877: Topic view inefficiencies when using the insert clause
The processing of topic views with 'insert' clauses after 'expand' clauses or many 'insert' clauses could lead to excessive CPU and memory utilisation. This problem has now been resolved.
DIF-1996: Topic Views Background Evaluation Latency
When a topic view evaluation involves the addition or removal of reference topics the evaluation is passed to a background thread so that the inbound thread is not blocked on locking the topic tree. However, in previous releases, if the background task could not lock the topic tree it would try again in 3 seconds. This could lead to an unnecessary backup of background re-evaluations when there are significant numbers of re-evaluations. This has now been resolved.
DIF-2396: Deadlock between UniversalTopicImpl and DerivedReferenceTopicImpl when using Throttle in topic views
There was the possibility of a thread deadlock occurring between UniversalTopicImpl and DerivedReferenceTopicImpl when using a topic view with throttling applied if the throttle being released coincided exactly with an update to the source topic. This has now been resolved.
Topics
DIF-849: The UNSUBSCRIBE conflation policy does not handle branch mapping subscriptions correctly
Due to a bug in previous releases, the UNSUBSCRIBE conflation policy did not correctly handle branch mapping subscriptions. This has been fixed in this release.
Known Issues
Replication
DIF-2527: Hazelcast Warning messages on Windows and Mac
Hazelcast Warning
Hazelcast provides clustering support within Diffusion; with this release of Diffusion, Hazelcast - 5.3.x is used. This newer version of Hazelcast adds options for per-socket keep-alive configuration. When using particular operating systems (typically Windows/MacOS) and mostly older JVM combinations, log messages are output by Hazelcast warning:
* "Ignoring TCP_KEEPCOUNT. It seems your JDK does not support jdk.net.ExtendedSocketOptions on this OS. Try upgrading to the latest JDK or check with your JDK vendor.Alternatively, on Linux, configure tcp_keepalive_probes in the kernel (affecting default keep-alive configuration for all sockets): For more info see https://tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/. If this isn't dealt with, idle connections could be closed prematurely."
This type of message is then repeated for: "TCP_KEEPIDLE" and "TCP_KEEPINTERVAL".
Hazelcast have documented the warning and suitable configuration, please refer to: https://docs.hazelcast.com/hazelcast/5.3/clusters/network-configuration#configuring-tcp-keep-alive
Topic Views
DIF-166: Reference topics retained by 'preserve topics' are not persisted across server instances or cluster
A new 'preserve topics' clause was introduced to topic views in release 6.6.
This clause means that reference topics created by a view (that have a path dependent upon the source topic value) are retained until the source topic is removed or the topic view is removed.
Though this is true in the context of a single server instance, it is not the case if the server is restarted as all such topics created during the previous server instance will be lost. It is also not the case if a new server enters a cluster as the new server will only have reference topics generated from the point in time where it joined the cluster and will not reflect reference topics previously created within other cluster peers.
This issue occurs because reference topics are not persisted, either to file or across the cluster.
DIF-167: Restrictions on mapping single value topics to time series reference topics
The ability to specify a target type in a topic view was introduced in release 6.7.0.
When using this feature to map a single value topic to a time series topic there are the following restrictions.
1) The retained events in the target topic are not replicated across the cluster (as reference topics are not replicated). This means that a new server joining the cluster will not have the same number of retained events as other cluster members. For this reason mapping single value to time series topics should not be used in a clustered environment.
2) Retained events in the target topic are not persisted therefore when a server is restarted the target time series will initially start with a single event and will only grow as the source topic is updated.
The ability to map single-value topics to time series topics is deprecated at release 6.11 and an error message will be logged if used. If used in a single server a warning message will be logged.
DIF-2482: The Memory Overhead of Remote Topics is not accounted for in Metrics and Fetched Topic Sizes
Remote Topic Views maintain local caches of the values of the topics from the primary servers, however, this memory overhead is not accounted for in the metrics relating to topic sizes and memory. This means that when using remote topic views, there is an 'invisible' memory overhead which amounts to the size of each topic selected by the remote topic views from the primary server.
Furthermore, from release 6.11 it is also possible to 'fetch' the size of topics. For reference topics that are mapped from remote topics, a similar problem to the above occurs. A reference topic that is directly mapped from a remote topic will report its size as zero because under normal circumstances the size of such a reference topic is accounted for in the source topic. Similarly, a reference topic that is indirectly mapped from a remote topic will report its value size but will not consider the additional size of the source topic. The reference topic cannot simply add the size of the source topic as many reference topics can be mapped from the same remote topic and that would result in over accounting for the sizes.
Both of the above issues will be resolved in a future release.