1. 13 9月, 2023 1 次提交
    • 羽飞's avatar
      Create codeql.yml (#265) · 6a239a3b
      羽飞 提交于
      ### What problem were solved in this pull request?
      
      Problem:
      add code quality scan.
      6a239a3b
  2. 25 8月, 2023 1 次提交
    • X
      Add clangd config file (#249) · 76221e46
      xzhangxian1008 提交于
      ### What problem were solved in this pull request?
      Problem:
      clangd default finds `compile_commands.json` in `build` directory and
      the miniob's default building directory is not `build` which will lead
      to the clangd's failure of searching `compile_commands.json`.
      
      ### What is changed and how it works?
      
      create a soft link from build to build_xxx in build.sh when building.
      76221e46
  3. 09 8月, 2023 1 次提交
    • 羽飞's avatar
      Static gcc (#228) · f7b7c932
      羽飞 提交于
      ### What problem were solved in this pull request?
      
      Issue Number: close #222 
      
      Problem:
      gcc使用动态链接库,在复制observer到其它机器后,无法启动。
      
      ### What is changed and how it works?
      使用gcc静态链接库
      f7b7c932
  4. 30 6月, 2023 1 次提交
    • 羽飞's avatar
      Train debug (#203) · bc7919c3
      羽飞 提交于
      ### What problem were solved in this pull request?
      
      Problem:
      与训练营配合,可以在SQL命令请求过程中,添加调试信息
      
      ### What is changed and how it works?
      可以参考 debug-output.md 文档。
      增加 sql_debug 变量,使用set sql_debug=1; 可以设置。
      在SQL命令执行过程中,调用sql_debug函数,增加调试信息。在普通文本通讯协议中,调试信息会以 '#'
      开头的形式打印出来。但是注意调试信息中不要带换行符。
      
      ### Other information
      bc7919c3
  5. 14 6月, 2023 1 次提交
    • 羽飞's avatar
      Refactor (#195) · 93b79cc6
      羽飞 提交于
      ### What problem were solved in this pull request?
      
      Issue Number: close #173 close #136 
      
      ref #174 
      ref #165 
      
      Problem:
      这个PR修改了多个问题,可以参考各个issue。包括observer编译两次、代码目录规划不合理、command executor未全部实现等
      
      ### What is changed and how it works?
      做一些重构优化,包括CMakelist、一些代码目录、command executor
      93b79cc6
  6. 24 5月, 2023 1 次提交
    • 羽飞's avatar
      编译选项增加 Werror (#182) · c3bd02e3
      羽飞 提交于
      ### What problem were solved in this pull request?
      
      Issue Number: close #91 close #1 
      
      Problem:
      编译时编译器抛出的一些告警信息可以帮我们避免很多问题,但是现在并没有利用这个特性
      
      ### What is changed and how it works?
      CMake中增加-Werror编译选项
      
      ### Other information
      c3bd02e3
  7. 09 5月, 2023 1 次提交
    • 羽飞's avatar
      mvcc trx (#156) · 871c9b32
      羽飞 提交于
      ### What problem were solved in this pull request?
      
      Issue Number: close #155 close #135 
      
      Problem:
      实现了简单的事务处理。
      当前支持并发事务数据.
      
      ### What is changed and how it works?
      - 支持两种事务模式:Vacuous和MVCC。
        Vacuous 事务模式算是没有事务,它的事务接口什么都不做。
      MVCC 是多版本并发控制(Multi-Version Concurrency
      Control),使用多个版本保留记录数据。启动miniob时增加运行时选项 -t mvcc可以选择mvcc。
      
      - MVCC:简单模式的多版本并发控制。
        当前miniob仅包含insert和delete操作,因此数据最多包含两个版本,并且不需要在record中保留版本链表信息;
        不支持持久化;
        没有做垃圾回收;
        遗留一个BUG:在提交时没有保证提交的数据一次性对外可见;
        使用简单的写写冲突策略:检测到要修改的数据当前有人在修改,就回退
      
      - 编译MINIOB时使用 -DCONCURRENCY=ON 才会支持并发
      支持各个模块并发处理,包括buffer pool、bplus、record
      manager。如果编译时没有使用CONCURRENCY选项,则保持原样,不支持并发,保持系统的简单性。
      
      - 编译时增加 -DDEBUG=ON 还会增加并发调试日志与严格的运行时检测(ASSERT语句)
      - 当前版本代码中包含了bplus tree和record manager的并发测试,参考benchmark目录下的代码。
      
      ### Other information
      871c9b32
  8. 29 3月, 2023 1 次提交
    • 羽飞's avatar
      thread-safe buffer pool and btree supported (#145) · 31fa2558
      羽飞 提交于
      Fix problem:
      1. the buffer pool and b tree is not thread safe;
      2. github/workflow/build does not work
      
      ### What is changed and how it works?
      1. thread-safe buffer pool
      - I use a mutex in buffer pool and take a lock in buffer pool operations
      such as allocate frame, dispose frame;
      - The frame is locked while updating/reading the content of frame;
      - Frame manager take a lock when allocate/free pages.
      
      2. thread-safe b+tree
      - Crabing protocol is used to support concurrent
      
      3. github/workflow/build
      - update the submodules;
      - create a build script and run build.sh in build.yaml
      31fa2558