Skip to content

Commit fd1328f

Browse files
committed
Merge branch 'master' into develop
2 parents 9e24642 + 6f213ce commit fd1328f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+313
-283
lines changed

deps/oblib/src/rpc/obrpc/ob_rpc_proxy.ipp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ int ObRpcProxy::rpc_call(ObRpcPacketCode pcode, const Input &args,
216216
//do nothing
217217
}
218218
if (dst_ == ObRpcProxy::myaddr_) {
219+
oceanbase::lib::Thread::WaitGuard guard(oceanbase::lib::Thread::WAIT);
219220
ret = oceanbase::oblpc::send(*this, pcode, args, result, handle, opts);
220221
} else {
221222
ret = OB_NOT_SUPPORTED;
3.38 KB
Binary file not shown.
6 KB
Loading

docs/developer-guide/en/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# OceanBase SeekDB Development Guide
1+
# OceanBase seekdb Development Guide
22

33
## About this guide
44

5-
* **The target audience** of this guide is OceanBase SeekDB contributors, both new and experienced.
6-
* **The objective** of this guide is to help contributors become an expert of OceanBase SeekDB, who is familiar with its design and implementation and thus is able to use it fluently in the real world as well as develop OceanBase SeekDB itself deeply.
5+
* **The target audience** of this guide is OceanBase seekdb contributors, both new and experienced.
6+
* **The objective** of this guide is to help contributors become an expert of OceanBase seekdb, who is familiar with its design and implementation and thus is able to use it fluently in the real world as well as develop OceanBase seekdb itself deeply.
77

88
## The structure of this guide
99

1010
At present, the guide is composed of the following parts:
1111

1212
### 1. Get Started
1313

14-
This section helps you set up the development environment and get OceanBase SeekDB running on your machine. Follow these steps in order if you're new to the project.
14+
This section helps you set up the development environment and get OceanBase seekdb running on your machine. Follow these steps in order if you're new to the project.
1515

1616
1. [Install toolchain](toolchain.md) - Install the required development tools and dependencies
1717
2. [Get the code, build and run](build-and-run.md) - Clone the repository, build the project, and connect to the seekdb server
@@ -21,26 +21,26 @@ This section helps you set up the development environment and get OceanBase Seek
2121
Once you have the environment set up, these guides will help you develop effectively:
2222

2323
1. [Set up an IDE](ide-settings.md) - Configure your development environment for optimal productivity
24-
2. [Coding Conventions](coding-convention.md) - Learn OceanBase SeekDB's programming habits and conventions
24+
2. [Coding Conventions](coding-convention.md) - Learn OceanBase seekdb's programming habits and conventions
2525
3. [Coding Standard](coding-standard.md) - Detailed C++ coding standards and constraints
2626
4. [Write and run unit tests](unittest.md) - How to write and execute unit tests
2727
5. [Running MySQL test](mysqltest.md) - How to run MySQL compatibility tests
2828
6. [Debug](debug.md) - Debugging techniques and tools
2929

3030
### 3. Understanding the Codebase
3131

32-
Before you start developing a big feature, it's recommended to read these documents to better understand OceanBase SeekDB's internals:
32+
Before you start developing a big feature, it's recommended to read these documents to better understand OceanBase seekdb's internals:
3333

34-
1. [Logging System](logging.md) - How logging works in OceanBase SeekDB
34+
1. [Logging System](logging.md) - How logging works in OceanBase seekdb
3535
2. [Memory Management](memory.md) - Memory management strategies and best practices
3636
3. [Basic Data Structures](container.md) - Core data structures used in the codebase
3737

38-
### 4. Contribute to OceanBase SeekDB
38+
### 4. Contribute to OceanBase seekdb
3939

4040
Ready to contribute? This guide will help you get involved in the OceanBase community:
4141

4242
1. [Commit code and submit a pull request](contributing.md) - Step-by-step guide to contributing code changes
4343

4444
---
4545

46-
**Note**: If you're new to the project, we recommend following the sections in order. Experienced contributors can jump directly to the sections they need.
46+
**Note**: If you're new to the project, we recommend following the sections in order. Experienced contributors can jump directly to the sections they need.

docs/developer-guide/en/build-and-run.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ git clone https://github.com/oceanbase/seekdb.git
1515

1616
## Build
1717

18-
Build OceanBase SeekDB from the source code in debug mode or release mode:
18+
Build OceanBase seekdb from the source code in debug mode or release mode:
1919

2020
### Debug mode
2121

@@ -31,7 +31,7 @@ bash build.sh release --init --make
3131

3232
## Run
3333

34-
Now that you built the `observer` binary, you can deploy a SeekDB instance with the `obd.sh` utility:
34+
Now that you built the `observer` binary, you can deploy a seekdb instance with the `obd.sh` utility:
3535

3636
```shell
3737
./tools/deploy/obd.sh prepare -p /tmp/obtest
@@ -42,13 +42,13 @@ You can check the `mysql_port` in `./tools/deploy/single.yaml` file to see the l
4242

4343
## Connect
4444

45-
You can use the official MySQL client to connect to SeekDB:
45+
You can use the official MySQL client to connect to seekdb:
4646

4747
```shell
4848
mysql -uroot -h127.0.0.1 -P10000
4949
```
5050

51-
Alternatively, you can use the `obclient` to connect to SeekDB:
51+
Alternatively, you can use the `obclient` to connect to seekdb:
5252

5353
```shell
5454
./deps/3rd/u01/obclient/bin/obclient -h127.0.0.1 -P10000 -uroot -Doceanbase -A

docs/developer-guide/en/coding-convention.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Coding Convention
33
---
44

5-
OceanBase SeekDB is a giant project that has been developed for more than ten years and contains millions of lines of C++ code. It already has many unique programming habits. Here are some OceanBase SeekDB programming habits to help people who come into contact with the OceanBase SeekDB source code for the first time have an easier time accepting and understanding. For more detailed information, please refer to ["OceanBase SeekDB C++ Coding Standard"](./coding_standard.md).
5+
OceanBase seekdb is a giant project that has been developed for more than ten years and contains millions of lines of C++ code. It already has many unique programming habits. Here are some OceanBase seekdb programming habits to help people who come into contact with the OceanBase seekdb source code for the first time have an easier time accepting and understanding. For more detailed information, please refer to ["OceanBase seekdb C++ Coding Standard"](./coding-standard.md).
66

77
# Naming Convention
88

@@ -20,29 +20,29 @@ Both function names and variables use lowercase naming separated by `_`. Member
2020

2121
# Coding Style
2222

23-
SeekDB uses some relatively simple coding styles to try to make the code readable and clear, such as adding necessary spaces for operator brackets, not too long codes, not too long functions, adding necessary comments, reasonable naming, etc. Since the coding style has many details, new developers can just refer to the coding style in the current code to write code. This is also a suggestion for participating in other projects for the first time. We should try to keep it consistent with the original style.
23+
seekdb uses some relatively simple coding styles to try to make the code readable and clear, such as adding necessary spaces for operator brackets, not too long codes, not too long functions, adding necessary comments, reasonable naming, etc. Since the coding style has many details, new developers can just refer to the coding style in the current code to write code. This is also a suggestion for participating in other projects for the first time. We should try to keep it consistent with the original style.
2424

2525
There is no need to worry about the styles that you are not sure about. You can discuss it with us, or after submitting the code, someone will give suggestions or code together.
2626

2727
# Functional Coding Habits
2828

2929
## Prohibitting STL Containers
3030

31-
Since SeekDB supports multi-tenants resource isolation, in order to facilitate memory control, SeekDB prohibits the use of STL, boost and other containers. At the same time, SeekDB provides its own containers, such as `ObSEArray`, etc. For more information about SeekDB containers, please refer to [OceanBase SeekDB Container Introduction] (./container.md).
31+
Since seekdb supports multi-tenants resource isolation, in order to facilitate memory control, seekdb prohibits the use of STL, boost and other containers. At the same time, seekdb provides its own containers, such as `ObSEArray`, etc. For more information about seekdb containers, please refer to [OceanBase seekdb Container Introduction] (./container.md).
3232

3333
## Be Caution with the New C++ Standard
3434

35-
SeekDB does not encourage the use of some syntax of the new C++ standard, such as auto, smart pointers, move semantics, range-based loops, lambda, etc. SeekDB believes that these will bring many negative effects, such as
35+
seekdb does not encourage the use of some syntax of the new C++ standard, such as auto, smart pointers, move semantics, range-based loops, lambda, etc. seekdb believes that these will bring many negative effects, such as
3636

3737
- Improper use of `auto` can cause serious performance problems, but it only brings syntactic convenience;
3838
- Smart pointers cannot solve the problem of object memory usage, and improper use can also cause performance problems;
3939
- The use of move is extremely complex, and it will lead to deeply hidden BUGs without ensuring that everyone understands it correctly.
4040

41-
Of course, SeekDB does not exclude all new standards, such as encouraging the use of override, final, constexpr, etc. If you are not sure whether a certain syntax can be used, you can search and confirm in ["OceanBase SeekDB C++ Coding Standard"](./coding_standard.md).
41+
Of course, seekdb does not exclude all new standards, such as encouraging the use of override, final, constexpr, etc. If you are not sure whether a certain syntax can be used, you can search and confirm in ["OceanBase seekdb C++ Coding Standard"](./coding-standard.md).
4242

4343
## Single Entrance and Single Exit
4444

45-
It is mandatory for all functions to return at the end, and it is prohibited to call global jump instructions such as return, goto, and exit midway. This is also the most confusing part for everyone who comes into contact with SeekDB code for the first time.
45+
It is mandatory for all functions to return at the end, and it is prohibited to call global jump instructions such as return, goto, and exit midway. This is also the most confusing part for everyone who comes into contact with seekdb code for the first time.
4646

4747
In order to achieve this requirement, there will be a lot of `if/else if` in the code, and there are many less intuitive conditional judgments such as `OB_SUCC(ret)` in the `for` loop. At the same time, in order to reduce nesting, the macro `FALSE_IT` will be used to execute certain statements. for example
4848

@@ -102,7 +102,7 @@ Or similar simple judgment functions do not need to return int error codes.
102102

103103
## Need to Determine the Validity of All Return Values and Parameters
104104

105-
SeekDB requires that as long as the function has a return value, the return value must be tested, and "check if possible." Function parameters, especially pointers, must be checked for validity before use.
105+
seekdb requires that as long as the function has a return value, the return value must be tested, and "check if possible." Function parameters, especially pointers, must be checked for validity before use.
106106

107107
For example:
108108

@@ -127,9 +127,9 @@ int ObDDLServerClient::abort_redef_table(const obrpc::ObAbortRedefTableArg &arg,
127127
128128
## Memory Management
129129
130-
Memory management is a very troublesome issue in C/C++ programs. SeekDB has done a lot of work for memory management, including efficient memory allocation, memory problem detection, tenant memory isolation, etc. SeekDB provides a set of memory management mechanisms for this purpose, and also prohibits the direct use of C/C++ native memory allocation interfaces in programs, such as malloc, new, etc.
130+
Memory management is a very troublesome issue in C/C++ programs. seekdb has done a lot of work for memory management, including efficient memory allocation, memory problem detection, tenant memory isolation, etc. seekdb provides a set of memory management mechanisms for this purpose, and also prohibits the direct use of C/C++ native memory allocation interfaces in programs, such as malloc, new, etc.
131131
132-
The simplest, SeekDB provides the `ob_malloc/ob_free` interface to allocate and release memory:
132+
The simplest, seekdb provides the `ob_malloc/ob_free` interface to allocate and release memory:
133133
134134
```cpp
135135
void *ptr = ob_malloc(100, ObModIds::OB_COMMON_ARRAY);
@@ -143,18 +143,18 @@ if (NULL != ptr) {
143143
}
144144
```
145145

146-
SeekDB requires that the pointer must be assigned to null immediately after the memory is released.
147-
For more information about memory management, please refer to [OceanBase SeekDB Memory Management](./memory.md).
146+
seekdb requires that the pointer must be assigned to null immediately after the memory is released.
147+
For more information about memory management, please refer to [OceanBase seekdb Memory Management](./memory.md).
148148

149149
# Some Conventional Interfaces
150150

151151
## init/destroy
152152

153-
SeekDB requires that only some very lightweight data initialization work can be implemented in the constructor, such as variables initialized to 0, pointers initialized to nullptr, etc. Because in the constructor, it is not easy to handle some complex exception scenarios, and the return value cannot be given. Most classes in SeekDB have an init function, which is usually executed after the constructor and has an int error code as the return value. Do some more complex initialization work here. Correspondingly, the destroy function is usually provided to do resource destruction.
153+
seekdb requires that only some very lightweight data initialization work can be implemented in the constructor, such as variables initialized to 0, pointers initialized to nullptr, etc. Because in the constructor, it is not easy to handle some complex exception scenarios, and the return value cannot be given. Most classes in seekdb have an init function, which is usually executed after the constructor and has an int error code as the return value. Do some more complex initialization work here. Correspondingly, the destroy function is usually provided to do resource destruction.
154154

155155
## reuse/reset
156156

157-
Memory caching is a very effective way of improving performance. Many classes in SeekDB will have reuse/reset interfaces to facilitate the subsequent reuse of an object. Reuse usually represents lightweight cleanup work, while reset will do more resource cleanup work. But you need to look at the specific implementation class and cannot generalize.
157+
Memory caching is a very effective way of improving performance. Many classes in seekdb will have reuse/reset interfaces to facilitate the subsequent reuse of an object. Reuse usually represents lightweight cleanup work, while reset will do more resource cleanup work. But you need to look at the specific implementation class and cannot generalize.
158158

159159
## Operator Overloading
160160

0 commit comments

Comments
 (0)