Loading [MathJax]/jax/output/CommonHTML/config.js
前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >MySQL 主从复制 1594 报错分析

MySQL 主从复制 1594 报错分析

作者头像
爱可生开源社区
发布于 2025-03-28 05:00:12
发布于 2025-03-28 05:00:12
10900
代码可运行
举报
运行总次数:0
代码可运行
作者:陈伟,爱可生 DBA 团队成员,负责 MySQL 日常维护及故障处理。

爱可生开源社区出品,原创内容未经授权不得随意使用,转载请联系小编并注明来源。

本文约 2600 字,预计阅读需要 8 分钟。

1. 故障背景

客户反馈 MySQL 主从复制出现故障,检查后发现 SQL 线程停止写入报错 1594,但 IO 线程仍能正常拉取日志。

在从库执行 reset slave 命令并重建复制后,主从复制恢复正常。下面分析此次报错的详细原因。

为了给予客户更全面的的解答,本次采取全面排查的方式,逐个分析所有可能导致该故障的因素,找出最有可能引发此次故障的原因,以给客户提供一个准确的解释。

以下是本次故障分析的思路。

2. 故障分析

MySQL 版本:5.7.26,GTID 已启用。

2.1 查看从库报错信息

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
mysql> show slavestatus\G
*************************** 1.row ***************************
               Slave_IO_State: Waiting formasterto send event
                  Master_Host: xx.xx.xx.xx
                  Master_User: universe_op
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.xxxxxx
          Read_Master_Log_Pos: xxxxxx
               Relay_Log_File: mysql-relay.xxxxxx
                Relay_Log_Pos: 243865
        Relay_Master_Log_File: mysql-bin.xxxxxx
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 1594
                   Last_Error: Relay logreadfailure: Could notparse relay logevent entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay logis corrupted (you can check this by running 'mysqlbinlog'on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want tocheck the master's binary log or slave's relay log, you will be able to know their namesby issuing 'SHOW SLAVE STATUS'on this slave.
                 Skip_Counter: 0

根据 show slave status\G 得到主从报错的信息,我们可以很明确,读取 relay log 失败,无法解析中继日志中的事务。

2.2 查看从库错误日志

查看从库对应时间点的错误日志。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
2024-12-29T00:22:19.824988+08:00 241186 [ERROR] Error in Log_event::read_log_event(): 'Event crc check failed! Most likely there is event corruption.', data_len: 8060, event_type: 31
2024-12-29T00:22:19.825014+08:00 241186 [ERROR] Error reading relay log event for channel '': slave SQL thread aborted because of I/O error
2024-12-29T00:22:19.825027+08:00 241186 [ERROR] Slave SQL for channel '': Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: 1594
2024-12-29T00:22:21.146920+08:00 241186 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.053394' position 264587564.

根据错误日志中的报错信息,我们可以得到一些关键信息如下:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
2024-12-29T00:22:19.824988+08:00 241186 [ERROR] Error in Log_event::read_log_event(): 'Event crc check failed! Most likely there is event corruption.', data_len: 8060, event_type: 31
# 可以发现有 Event crc check failed 信息输出,这个错误通常表示日志事件的 CRC 校验失败,可能是由于事件的数据损坏或日志文件不完整。
# 当从库读取中继日志时,如果发生 CRC 校验错误,是可能导致从库的 SQL 线程中止,并报错 Relay Log Read Failure
2024-12-29T00:22:19.825027+08:00 241186 [ERROR] Slave SQL for channel '': Relay log read failure: Could not parse relay log event entry......... Error_code: 1594

根据错误日志得到的信息,可以发现存在日志事件的 CRC 校验失败。CRC 校验失败通常意味着数据在传输或存储过程中发生了损坏,可能的原因包括磁盘故障、网络问题、MySQL 服务异常关闭或者主库的 binlog 文件损坏或者从库的 relay log 损坏,从而导致无法解析中继日志中的事务。

2.3 进一步排查可能中断的原因

首先检查一下对应时间点的系统日志,没有异常信息输出,排除磁盘故障,也未发现报错时段的 MySQL OOM 信息。

排查是否是事务过大,比如事务超过 max_allowed_packet 限制,发生的分片写入错误。

根据中断时的最后一个 gtid 信息可得在写 019edbbe-8c87-11ee-a06d-005056943f0f:625715013 时 SQL 线程中断。计算该 gtid 事务的大小,根据计算得出该事务大小为 20M,本次故障排除事务过大导致。

最后检查了主库故障时间点的 MySQL 服务状态以及对应时间主库的 binlog 文件,并没有发现任何异常,同时查看故障时间点的网络监控,也是正常的。

到这基本很明确是 relay log 这边出现了问题,从而导致无法解析中继日志中的事务。由于客户环境未能保留报错时的 relay log ,所以只能去通过自己的环境去复现客户故障,并与客户故障环境已采集的信息作比对。

2.4 本地环境复现

查看当前环境主从状态。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
mysql> show slavestatus\G
*************************** 1.row ***************************
               Slave_IO_State: Waiting formasterto send event
                  Master_Host: 10.186.63.44
                  Master_User: universe_op
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000001
          Read_Master_Log_Pos: 3527783
               Relay_Log_File: mysql-relay.000003
                Relay_Log_Pos: 10303
        Relay_Master_Log_File: mysql-bin.000001
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB: 

手动关闭 SQL 线程。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
mysql> STOP SLAVE SQL_THREAD;
Query OK, 0 rows affected (0.00 sec)

查看当前复制状态。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
mysql> show slavestatus\G
*************************** 1.row ***************************
               Slave_IO_State: Waiting formasterto send event
                  Master_Host: 10.186.63.44
                  Master_User: universe_op
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000001
          Read_Master_Log_Pos: 3510430
               Relay_Log_File: mysql-relay.000004
                Relay_Log_Pos: 12695
        Relay_Master_Log_File: mysql-bin.000001
             Slave_IO_Running: Yes
            Slave_SQL_Running: No

再次查看复制状态。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
mysql> show slave status\G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 10.186.63.44
                  Master_User: universe_op
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000001
          Read_Master_Log_Pos: 3560144
               Relay_Log_File: mysql-relay.000007
                Relay_Log_Pos: 4675
        Relay_Master_Log_File: mysql-bin.000001
             Slave_IO_Running: Yes
            Slave_SQL_Running: No

此刻观察到环境信息与客户环境一致,SQL 线程停止写入,IO 线程正常拉取日志。

模拟 SQL 线程故障:使用 hexedit[1] 编辑 relay log 文件。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
hexedit mysql-relay.000007

开启 SQL 线程查看复制状态。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
mysql> START SLAVE SQL_THREAD;
Query OK, 0 rows affected (0.02 sec)

mysql> showslavestatus\G
*************************** 1.row ***************************
               Slave_IO_State: Waiting formasterto send event
                  Master_Host: 10.186.63.44
                  Master_User: universe_op
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000001
          Read_Master_Log_Pos: 32050487
               Relay_Log_File: mysql-relay.000007
                Relay_Log_Pos: 243865
        Relay_Master_Log_File: mysql-bin.000001
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 1594
                   Last_Error: Relay logreadfailure: Could notparse relay logevent entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay logis corrupted (you can check this by running 'mysqlbinlog'on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want tocheck the master's binary log or slave's relay log, you will be able to know their namesby issuing 'SHOW SLAVE STATUS'on this slave.
                 Skip_Counter: 0

查看 MySQL 报错信息。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
024-12-31T09:34:36.385535+08:00 1448 [ERROR] Error in Log_event::read_log_event(): 'Event crc check failed! Most likely there is event corruption.', data_len: 80, event_type: 31
2024-12-31T09:34:36.385593+08:00 1448 [ERROR] Error reading relay log event for channel '': slave SQL thread aborted because of I/O error
2024-12-31T09:34:36.385608+08:00 1448 [ERROR] Slave SQL for channel '': Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: 1594
2024-12-31T09:34:36.386764+08:00 1448 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000001' position 3795113.

至此,通过上面的排除法,以及通过比对本地环境复现的报错信息,可明显判断导致 1594 报错的原因是:在传输或者写入 relay log 的过程中,中继文件意外发生了损坏,从而导致 SQL 线程无法拉取中继日志。

2.5 继续解析 relay log

下面我们解析一下 relay log ,看一下有哪些报错的提示信息输出,并进行总结。

首先先解析 relay log 查看报错,可以正常解析,看不出来什么异常。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# at 243865
#241231  1:12:35 server id 675216691  end_log_pos 3795178 CRC32 0x886c766d      GTID    last_committed=8108     sequence_number=8109    rbr_only=yes
/*!50718 SET TRANSACTION ISOLATION LEVEL READ COMMITTED*//*!*/;
SET @@SESSION.GTID_NEXT= 'ee2fddba-c6c7-11ef-8e2a-02000aba3f2c:8109'/*!*/;
# at 243930
#241231  1:12:35 server id 675216691  end_log_pos 3795254 CRC32 0x31082f91      Query   thread_id=71    exec_time=0     error_code=0
SET TIMESTAMP=1735578755/*!*/;
BEGIN;44006
#241231  1:12:35 server id 675216691  end_log_pos 3795412 CRC32 0xd1baa47b      Rows_query
# /*ustats-10-186-63-44*/update universe.u_delay set real_timestamp=now(), logic_timestamp = logic_timestamp + 1 where source = 'ustats'
# at 244164
#241231  1:12:35 server id 675216691  end_log_pos 3795471 CRC32 0x9b859b01      Table_map: `universe`.`u_delay` mapped to number 211
# at 244223
#241231  1:12:35 server id 675216691  end_log_pos 3795551 CRC32 0x69696969      Update_rows: table id 211 flags: STMT_END_F
BINLOG '/T4ongAAANTpOQCAAIYvKnVzdGF0cy0xMC0xODYtNjMtNDQqL3VwZGF0ZSB1bml2ZXJz
ZS51X2RlbGF5IHNldCByZWFsX3RpbWVzdGFtcD1ub3coKSwgbG9naWNfdGltZXN0YW1wID0gbG9n
aWNfdGltZXN0YW1wICsgMSB3aGVyZSBzb3VyY2UgPSAndXN0YXRzJ3ukutE=
g9RyZxMz/T4oOwAAAA/qOQAAANMAAAAAAAEACHVuaXZlcnNlAAd1X2RlbGF5AAMPEggD+AIABgGb
hZs=Zx8z/T4oUAAAAF/qOQAAANMAAAAAAAEAAgAD///4BgB1c3RhdHOZtT4TIkQfAAAAAAAA+AYA
dXN0YXRzmbU+aWlpaWlpaWlpaWlpaWk=
'/*!*/;ATE `universe`.`u_delay`
### WHERE
###   @1='ustats' /* VARSTRING(760) meta=760 nullable=0 is_null=0 */
###   @2='2024-12-31 01:12:34' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
###   @3=8004 /* LONGINT meta=0 nullable=1 is_null=0 */
### SET1='ustats' /* VARSTRING(760) meta=760 nullable=0 is_null=0 */
###   @2='2024-12-31 06:37:41' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
###   @3=7595718147998050665 /* LONGINT meta=0 nullable=1 is_null=0 */
# at 244303
#241230 17:35:37 server id 675216691  end_log_pos 3795582 CRC32 0x48e0358c      Xid = 85886
COMMIT/*!*/;

由于可以正常解析,那么我们就通过 MySQL 自带的 mysqlbinlog 来验证 relay log 中故障时间点前后事件的 CRC,看看有没有什么异常信息输出。

命令及输入如下:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
mysqlbinlog --verify-binlog-checksum mysql-relay.000007

查看输出内容:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# at 243865
#241231  1:12:35 server id 675216691  end_log_pos 3795178 CRC32 0x886c766d      GTID    last_committed=8108     sequence_number=8109    rbr_only=yes
/*!50718 SET TRANSACTION ISOLATION LEVEL READ COMMITTED*//*!*/;
SET @@SESSION.GTID_NEXT= 'ee2fddba-c6c7-11ef-8e2a-02000aba3f2c:8109'/*!*/;
# at 243930
#241231  1:12:35 server id 675216691  end_log_pos 3795254 CRC32 0x31082f91      Query   thread_id=71    exec_time=0     error_code=0
SET TIMESTAMP=1735578755/*!*/;
BEGIN
/*!*/;
# at 244006
# at 244164
#241231  1:12:35 server id 675216691  end_log_pos 3795471 CRC32 0x9b859b01      Table_map: `universe`.`u_delay` mapped to number 211
ERROR: Error in Log_event::read_log_event(): 'Event crc check failed! Most likely there is event corruption.', data_len: 80, event_type: 31
ERROR: Could not read entry at offset 244223: Error inlog format or read error.
WARNING: The range of printed events ends with a row event or a table map event that does not have the STMT_END_F flag set. This might be because the last statement was not fully written to the log, or because you are using a --stop-position or --stop-datetime that refers to an event in the middle of a statement. The event(s) from the partial statement have not been written to output.

发现有 CRC 报错输出,relay log 读取报错原因是 最后一个事务未完整写入

3. 总结

首先,在进行 MySQL 故障处理时,应先尽量保留下必要的信息以方便后续排查具体的原因,再去处理故障、恢复业务。其次,针对 1594 主从故障,一般情况有以下几个原因导致,我们可以针对可能导致的原因并结合数据库的错误日志进行进一步排查和修复。

  • 中继日志文件损坏:磁盘故障、非正常关机导致文件损坏。
  • 磁盘空间不足:从库无法写入新的事件到中继日志。
  • 主库日志丢失:主库清理了未同步的二进制日志,导致从库请求的日志位置失效。
  • 权限或路径错误:MySQL 进程无权访问中继日志文件,或路径配置错误。

参考资料

[1]hexedit: https://hexed.it/

本文关键字:#MySQL# #主从复制# #1594#

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2025-03-27,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 爱可生开源社区 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
【Http】一文备忘Http状态码(406,415,422)
最近在调试接口时,web api 报了一个415状态码。好久没见到这个状态码,一时还真不知道啥情况。所以,人的大脑是有遗忘规律的,为了加深印象,所以我觉得我有必要再复习一下。
DDGarfield
2022/06/23
1.7K0
【5min+】AspNet Core中的全局异常处理
【五分钟的dotnet】是一个利用您的碎片化时间来学习和丰富.net知识的博文系列。它所包含了.net体系中可能会涉及到的方方面面,比如C#的小细节,AspnetCore,微服务中的.net知识等等。 5min+不是超过5分钟的意思,"+"是知识的增加。so,它是让您花费5分钟以下的时间来提升您的知识储备量。
句幽
2020/04/27
1.9K0
告别异常臃肿!C# Result模式实战:用.NET构建更优雅的错误处理系统
在.NET开发中,异常处理虽广泛使用,但可能带来性能损耗与代码复杂度。本文将揭秘如何通过Result模式替代异常,构建高可读、易维护且性能更优的.NET应用。
郑子铭
2025/05/21
1120
告别异常臃肿!C# Result模式实战:用.NET构建更优雅的错误处理系统
asp.net core之异常处理
在开发过程中,处理错误是一个重要的方面。ASP.NET Core提供了多种方式来处理错误,以确保应用程序的稳定性和可靠性。
饭勺oO
2023/10/18
4050
asp.net core之异常处理
ASP.NET Core 警惕可空类型开启之后模型校验失败
在开启 Nullable 可空类型之后,原本可以调用的 API 也许就会提示 400 BadRequest 因为传入参数不合法,模型校验失败,此时将不会进入预期的 API 函数,同时也不会在输出里面找到有用的信息
林德熙
2020/08/31
1.6K0
浅入ABP(2):添加基础集成服务
上一篇,我们已经搭建起了一个基本的程序结构,下面我们来添加一些必要的服务,例如异常拦截器、跨域等。
痴者工良
2021/04/26
2K0
ASP.NET CORE Study06
需要在 startup 类中的 ConfigureService 方法中进行配置 示例:
Echo_Wish
2023/11/30
1720
ASP.NET Core 错误处理(Handle Errors)
链接:cnblogs.com/xiaoxiaotank/p/15586706.html
郑子铭
2021/12/01
2.2K0
ASP.NET Core 错误处理(Handle Errors)
.net 温故知新【11】:Asp.Net Core WebAPI 入门使用及介绍
在Asp.Net Core 上面由于现在前后端分离已经是趋势,所以asp.net core MVC用的没有那么多,主要以WebApi作为学习目标。
SpringSun
2023/06/09
2.4K0
.net 温故知新【11】:Asp.Net Core WebAPI 入门使用及介绍
.NET Core开发实战(第22课:异常处理中间件:区分真异常与逻辑异常)--学习笔记(下)
接下来介绍使用代理方法的方式,也就是说把 ErrorController 整段逻辑直接定义在注册的地方,使用一个匿名委托来处理,这里的逻辑与之前的逻辑是相同的
郑子铭
2021/01/13
5180
在.NET Core 中使用 FluentValidation 进行规则验证
如果使用Web API或MVC页面,那么可能习惯了自带的规则验证,我们的控制器很干净:
全球技术精选
2021/03/03
1.8K0
在.NET Core 中使用 FluentValidation 进行规则验证
在 ASP.NET Core 中实现幂等 REST API
幂等性是 REST API 的一个关键概念,可确保系统的可靠性和一致性。幂等操作可以重复多次,而不会更改初始 API 请求之外的结果。此属性在分布式系统中尤其重要,因为网络故障或超时可能会导致重复请求。
郑子铭
2024/12/24
2310
在 ASP.NET Core 中实现幂等 REST API
ASP.NET Core错误处理中间件[3]: 异常处理器
DeveloperExceptionPageMiddleware中间件错误页面可以呈现抛出的异常和当前请求上下文的详细信息,以辅助开发人员更好地进行纠错诊断工作。ExceptionHandlerMiddleware中间件则主要面向最终用户,我们可以利用它来显示一个友好的定制化错误页面。更多关于ASP.NET Core的文章请点这里]
蒋金楠
2021/01/21
1K0
AspNetCore全局异常处理
在开发ASP.NET Core应用程序时,全局异常处理是一个重要的概念。它允许我们集中处理应用程序中未捕获的异常,确保应用程序的稳定性和用户体验。
Net分享
2024/12/11
1550
AspNetCore全局异常处理
从 MVC 到使用 ASP.NET Core 6.0 的Minimal API
https://benfoster.io/blog/mvc-to-minimal-apis-aspnet-6/
郑子铭
2021/11/10
8K0
使用 .NET Core 中的超时中间件提高 UI 性能
今天带来了 .NET Core 的新文章 Timeout 中间件,让我们了解一下,看看我们可以实时应用哪些地方。
郑子铭
2024/12/31
2430
使用 .NET Core 中的超时中间件提高 UI 性能
【ASP.NET Core 基础知识】--Web API--创建和配置Web API(二)
集成Entity Framework Core(EF Core)是在ASP.NET Core Web API中进行数据库访问的常见方式。以下是集成EF Core的基本步骤:
喵叔
2024/05/24
6500
ASP.NET Core 6框架揭秘实例演示[33]:异常处理高阶用法
NuGet包“Microsoft.AspNetCore.Diagnostics”中提供了几个与异常处理相关的中间件,我们可以利用它们将原生的或者定制的错误信息作为响应内容发送给客户端。《错误页面的N种呈现方式》演示了几个简单的实例使读者大致了解这些中间件的作用,现在我们来演示几个高阶用法。本文提供的示例演示已经同步到《ASP.NET Core 6框架揭秘-实例演示版》)
蒋金楠
2022/09/23
1.3K0
ASP.NET Core 6框架揭秘实例演示[33]:异常处理高阶用法
ASP.NET 中验证的自定义返回和统一社会信用代码的内置验证实现
DataAnnotations 命名空间提供常用的内置验证特性,可通过声明方式应用于类或属性。我们不需要编写复杂的逻辑,仅需要指定一次,即可应用到整个项目中。代码量的减少,意味着更少的出错,也更易于测试和维护。指定了验证特性的模型会进行强制执行这些验证,有助于提升应用的可靠性,同时保证你在忘记编写某些验证逻辑时,防止你通过应用提交错误的数据到数据库。下面我们来实际使用一下:
桑榆肖物
2022/11/18
1.1K0
ASP.NET 中验证的自定义返回和统一社会信用代码的内置验证实现
.NET云原生应用实践(二):Sticker微服务RESTful API的实现
毋庸置疑,Sticker微服务需要访问数据库来管理“贴纸”(也就是“Sticker”),因此,以什么方式来存储数据,就是一个无法绕开的话题。如果你遵循领域驱动设计的思想,那么你可以说,保存到数据库的数据,就是“贴纸”聚合在持久化到仓储后的一种对象状态。那现在的问题是,我们需要遵循领域驱动设计的思想吗?
郑子铭
2024/11/23
1270
.NET云原生应用实践(二):Sticker微服务RESTful API的实现
推荐阅读
相关推荐
【Http】一文备忘Http状态码(406,415,422)
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
本文部分代码块支持一键运行,欢迎体验
本文部分代码块支持一键运行,欢迎体验