forked from oceanbase/miniob
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### What problem were solved in this pull request? Issue Number: close oceanbase#322 oceanbase#301 oceanbase#143 oceanbase#47 ref oceanbase#138 Problem: 当前使用的seda处理框架和libevent消息处理模式不适用于SQL处理模型。 SQL 请求处理模式是来一个请求应答后才能接收新的请求。但是当前收到某个连接的消息后在返回应答之前,可以接收新的请求,导致可以同时处理同一个连接的多个请求,出现并发错误。 另外,同一个SQL请求,需要有一个统一的处理上下文,不能在线程间切来切去。而seda将处理请求分为多个stage,会在不同的线程间切换。 ### What is changed and how it works? 新增线程模型概念,用来处理连接上的请求。设计文档参考 miniob-thread-model.md。 对于新连接监听,放在主线程来做。接收到新连接时,交给线程模型来处理,可以是一个连接一个线程,也可以是一个线程池统一管理。 不管使用哪种模型,在处理一个SQL结束之前,不会去监听该连接上是否有新的消息到达,因此也不会出现一个连接上多个请求同时处理的情况。 ### Other information 本设计参考了Java的线程池和Percona/MariaDB的线程池(虽然没有实现)设计
- Loading branch information
Showing
80 changed files
with
2,591 additions
and
4,980 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.