Neo4j 2025.01 中的重大变更

本节涵盖了 Neo4j 2025.01 中的破坏性变更,这是 Neo4j 5.26 LTS 之后的第一个版本。破坏性变更仅在长期支持 (LTS) 版本发布后的紧接着的版本中进行。有关如何从之前的 Neo4j 版本迁移到最新版本 Neo4j 2026.03 的指南,请参阅升级与迁移指南

集群

发现服务 (Discovery service)

在 2025.01 版本中,发现服务 v1 已被移除。因此,必须在升级到 Neo4j 2025.01 之前完成从 v1 到 v2 的过渡。

有关详细信息,请参阅操作手册 → 从发现服务 v1 迁移到 v2

配置设置
  • 在 2025.01 版本中,移除了 server.discovery.advertised_addressserver.discovery.listen_address 配置项。

    要列出发现端点(例如,提供给发现解析器使用),请使用 server.cluster.advertised_address 配置项的值。

  • 与发现服务 v2 相关的两个配置项已重命名。在从 Neo4j 5.26 迁移到 2025.01 版本时,您仍然可以使用它们。但建议更新您的 neo4j.conf 文件以使用新配置项。

    表 1. 重命名的配置项
    旧名称 新名称

    dbms.cluster.discovery.v2.endpoints

    dbms.cluster.endpoints

    dbms.kubernetes.discovery.v2.service_port_name

    dbms.kubernetes.discovery.service_port_name

端口

从 2025.01 开始不再使用端口 5000。内部流量请使用端口 6000

有关详细信息,请参阅配置 → 端口

日志记录

从 Neo4j 2025.01 开始,默认的 debug.log 格式已从文本更改为 JSON。强烈建议保持开启且不要更改它。
如果您需要其他格式的 debug.log 消息,请创建额外的 Appender,因为 Neo4j 支持团队使用默认的 Appender。有关更多信息,请参阅默认日志配置

内置存储过程

查看 Neo4j 2025.01 中被移除且无替代方案的存储过程。

Neo4j 配置项

已移除的配置项

查看 Neo4j 2025.01 中已移除的配置项。
名称 注释

db.cluster.raft.leader_transfer.priority_group 企业版

已移除且无替代方案。请改用 db.cluster.raft.leader_transfer.priority_tag

db.logs.query.annotation_data_as_json_enabled 动态

已被 db.logs.query.annotation_data_format 取代。

db.tx_state.memory_allocation

已移除且无替代方案。

dbms.cluster.catchup.client_inactivity_timeout 企业版

请使用 dbms.cluster.network.client_inactivity_timeout

dbms.cluster.discovery.log_level 企业版

已移除且无替代方案。

dbms.cluster.discovery.type 企业版

已移除且无替代方案。

dbms.cluster.discovery.endpoints 企业版

已移除且无替代方案。

dbms.cluster.discovery.version 企业版

已移除且无替代方案。

dbms.kubernetes.service_port_name 企业版

已移除且无替代方案。

initial.dbms.database_allocator 企业版

已移除且无替代方案。

server.cluster.catchup.connect_randomly_to_server_group 企业版 动态

已移除且无替代方案。
请改用 server.cluster.catchup.connect_randomly_to_server_tags

server.discovery.advertised_address 企业版

已移除且无替代方案。
请改用 server.cluster.advertised_address 的值。

server.discovery.listen_address 企业版

已移除且无替代方案。
请改用 server.cluster.listen_address 的值。

server.groups 企业版

已被 initial.server.tags 取代。

server.memory.off_heap.block_cache_size

已移除且无替代方案。

server.memory.off_heap.max_cacheable_block_size

已移除且无替代方案。

server.memory.off_heap.transaction_max_size

已移除且无替代方案。

配置项默认值的变更

这些更改仅影响新安装或涉及替换现有配置文件的升级。

查看 Neo4j 2025.01 中默认值的变更。
名称 旧默认值 新默认值

db.logs.query.annotation_data_format 动态

CYPHER

JSON

dbms.databases.seed_from_uri_providers 企业版

S3SeedProvider,CloudSeedProvider

CloudSeedProvider

server.metrics.csv.rotation.compression 企业版

NONE

ZIP

server.panic.shutdown_on_panic 企业版

false

true

server.logs.config

conf/server-logs.xml

server-logs.xml

server.logs.user.config

conf/user-logs.xml

user-logs.xml

配置项有效值的变更

server.logs.configserver.logs.user.config 现在取决于提供的 conf 目录路径,而不是在默认值中硬编码 conf 目录。

表 2. 更新后的配置项
名称 旧有效值 新有效值

server.logs.config

一个路径。如果是相对路径,则从 server.directories.neo4j_home 解析。

一个路径。如果是相对路径,则从 server.directories.configuration 解析。

server.logs.user.config

一个路径。如果是相对路径,则从 server.directories.neo4j_home 解析。

一个路径。如果是相对路径,则从 server.directories.configuration 解析。

Neo4j 度量指标

已移除的度量指标

查看 Neo4j 2025.01 中已移除的度量指标。
度量指标类别 度量指标名称

Raft 核心度量指标 - 已相应由 Raft 度量指标取代

<prefix>.causal_clustering.core.append_index
<prefix>.causal_clustering.core.commit_index
<prefix>.causal_clustering.core.applied_index
<prefix>.causal_clustering.core.term
<prefix>.causal_clustering.core.tx_retries
<prefix>.causal_clustering.core.is_leader
<prefix>.causal_clustering.core.in_flight_cache.total_bytes
<prefix>.causal_clustering.core.in_flight_cache.max_bytes
<prefix>.causal_clustering.core.in_flight_cache.element_count
<prefix>.causal_clustering.core.in_flight_cache.max_elements
<prefix>.causal_clustering.core.in_flight_cache.hits
<prefix>.causal_clustering.core.in_flight_cache.misses
<prefix>.causal_clustering.core.raft_log_entry_prefetch_buffer.lag
<prefix>.causal_clustering.core.raft_log_entry_prefetch_buffer.bytes
<prefix>.causal_clustering.core.raft_log_entry_prefetch_buffer.size
<prefix>.causal_clustering.core.raft_log_entry_prefetch_buffer.async_put
<prefix>.causal_clustering.core.raft_log_entry_prefetch_buffer.sync_put
<prefix>.causal_clustering.core.message_processing_delay
<prefix>.causal_clustering.core.message_processing_timer
<prefix>.causal_clustering.core.replication_new
<prefix>.causal_clustering.core.replication_attempt
<prefix>.causal_clustering.core.replication_fail
<prefix>.causal_clustering.core.replication_maybe
<prefix>.causal_clustering.core.replication_success
<prefix>.causal_clustering.core.last_leader_message

读取副本度量指标 - 已相应由 存储复制度量指标取代

<prefix>.causal_clustering.read_replica.pull_updates
<prefix>.causal_clustering.read_replica.pull_update_highest_tx_id_requested
<prefix>.causal_clustering.read_replica.pull_update_highest_tx_id_received

发现服务 V1 度量指标 - 已移除且无替代方案。请参阅 发现度量指标

<prefix>.cluster.discovery.replicated_data
<prefix>.cluster.discovery.cluster.members
<prefix>.cluster.discovery.cluster.unreachable
<prefix>.cluster.discovery.cluster.converged
<prefix>.cluster.discovery.restart.success_count
<prefix>.cluster.discovery.restart.failed_count

重命名的度量指标

在 Neo4j 2025.01 中,<prefix>.store.size.total 被重命名为 <prefix>.store.size.full,以符合 Prometheus 的命名要求。

更多详情,请参见表格 数据库存储大小度量指标

SSL 框架

从 Neo4j 2025.01 开始不再支持基于 CBC 的密码套件。
  • TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384

  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

  • TLS_DHE_RSA_WITH_AES_256_CBC_SHA256

  • TLS_DHE_RSA_WITH_AES_128_CBC_SHA256

    更多详情,请参考安全章节下的 SSL 框架 页面。

SSL 相关配置项

从 2025.01 开始,dbms.ssl.policy.*.verify_hostname 的默认值已从 false 更改为 true。有关更多信息,请参阅 SSL 框架 页面上的表格

Java API 的变更

查看已移除的公共 API
  • com.neo4j.configuration.EnterpriseEditionSettings.initial_database_allocator

  • com.neo4j.configuration.EnterpriseEditionSettings.server_groups

  • com.neo4j.configuration.EnterpriseEditionSettings.server_max_number_of_databases

  • com.neo4j.dbms.procedures.wait.WaitResponseState

  • com.neo4j.configuration.ClusterSettings.DEFAULT_CLUSTER_STATE_DIRECTORY_NAME

  • com.neo4j.configuration.ClusterSettings.DEFAULT_DISCOVERY_PORT

  • com.neo4j.configuration.ClusterSettings.DEFAULT_RAFT_PORT

  • com.neo4j.configuration.ClusterSettings.DEFAULT_TRANSACTION_PORT

  • com.neo4j.configuration.ClusterSettings.catchup_connect_randomly_to_server_group

  • com.neo4j.configuration.ClusterSettings.raft_leader_transfer_priority_group

  • com.neo4j.configuration.ClusterBaseSettings.DEFAULT_DISCOVERY_PORT

  • com.neo4j.configuration.ClusterNetworkSettings.catchup_client_inactivity_timeout

  • com.neo4j.causalclustering.discovery.parallel.ParallelDiscoveryMode

  • com.neo4j.causalclustering.discovery.resolve.RemotesResolver.Type

  • com.neo4j.causalclustering.discovery.resolve.RemotesResolver.init(com.neo4j.causalclustering.discovery.resolve.RemotesResolver.Type, org.neo4j.graphdb.config.Configuration, org.neo4j.logging.LogProvider)

  • com.neo4j.configuration.ClusterAddressSettings.discovery_advertised_address

  • com.neo4j.configuration.DiscoverySettings.discovery_endpoints

  • com.neo4j.configuration.DiscoverySettings.discovery_listen_address

  • com.neo4j.configuration.DiscoverySettings.discovery_log_level

  • com.neo4j.configuration.DiscoverySettings.discovery_type

  • com.neo4j.configuration.DiscoverySettings.discovery_version

  • com.neo4j.configuration.KubernetesSettings.kubernetes_service_port_name

  • com.neo4j.configuration.RaftSettings.DEFAULT_CLUSTER_STATE_DIRECTORY_NAME

  • com.neo4j.configuration.RaftSettings.DEFAULT_RAFT_PORT

  • com.neo4j.dbms.seeding.SeedDownloadStreamWrapper

  • com.neo4j.dbms.seeding.SeedProvider

  • com.neo4j.dbms.seeding.SeedProviderDependencies

  • org.neo4j.configuration.GraphDatabaseSettings.TransactionStateMemoryAllocation

  • org.neo4j.configuration.GraphDatabaseSettings.log_queries_annotation_data_as_json

  • org.neo4j.configuration.GraphDatabaseSettings.tx_state_max_off_heap_memory

  • org.neo4j.configuration.GraphDatabaseSettings.tx_state_memory_allocation

  • org.neo4j.configuration.GraphDatabaseSettings.tx_state_off_heap_block_cache_size

  • org.neo4j.configuration.GraphDatabaseSettings.tx_state_off_heap_max_cacheable_block_size

SeedProvider 已被移除并由 DatabaseSeedProvider 取代。有关详细信息,请参阅 Java 参考 → 扩展 Neo4j → 设置插件项目