Repository navigation
Add the cn-service - #4535
Add the cn-service#4535
Conversation
| format = "json" | ||
| max-size = 512 | ||
|
|
||
| [cn.frontend] |
There was a problem hiding this comment.
The default configuration needs to be removed from the configuration to keep it simple, and the default value is set inside the code
There was a problem hiding this comment.
The default configuration needs to be removed from the configuration to keep it simple, and the default value is set inside the code
I will remove the parameters using the default value
There was a problem hiding this comment.
I recommend comment out optional configuration items, so that users can easily inspect all the configuration items and default values in one place while we still keep the minimal configuration simple.
There was a problem hiding this comment.
Also, we don't need a full test toml in etc if we do so. (maybe we still need a full one in bvt to verify all the configuration items are working)
There was a problem hiding this comment.
We may need the rule to classify those configured parameters into:
- parameters can be modified by users(need to expose to users by default)
- parameters can but are not recommended for modification
- parameters cannot be modified by the user, like
rootname...
There was a problem hiding this comment.
btw, better to remove all these parameters used by the internal modules, like processLimitationSize, portOfRpcServerInComputationEngine and etc. I don't think users need to know them at all.
There was a problem hiding this comment.
How do you like? @zhangxu19830126 @daviszhen
I keep all the parameters of the frontend with the default values and remove them from the cn-minimal
There was a problem hiding this comment.
Also, we don't need a full test toml in etc if we do so. (maybe we still need a full one in bvt to verify all the configuration items are working)
I remove it.
There was a problem hiding this comment.
btw, better to remove all these parameters used by the internal modules, like
processLimitationSize,portOfRpcServerInComputationEngineand etc. I don't think users need to know them at all.
I remove them.
| ) | ||
|
|
||
| func NewService(cfg *Config) (Service, error) { | ||
| var ( |
There was a problem hiding this comment.
remove to mo-service/version.go
There was a problem hiding this comment.
I will add a configuration item to transfer the MOVersion from the mo-service to the cn-service away from the circular reference
|
@daviszhen will talk later this week on how to setup HAKeeper client in CN Service for heartbeating and querying cluster details (get how many CN/DN nodes are in the system). |
fengttt
left a comment
There was a problem hiding this comment.
Is this change related to system variables and session variables?
Yesterday @fengttt advised that @zhangxu19830126 to setup the CN service store involved with HAKeeper. |
| processLimitationPartitionRows = 42949672960 | ||
|
|
||
| #record the time elapsed of executing sql request | ||
| recordTimeElapsedOfSqlRequest = true |
There was a problem hiding this comment.
remove from the toml config. Init with default value in the code
There was a problem hiding this comment.
I will remove it.
There was a problem hiding this comment.
I also add a 'cn-full-test.toml' with all parameters with default values.
| traceBatchProcessor = "InternalExecutor" | ||
|
|
||
| #With true, system will check all the children span is ended, which belong to the closing span. | ||
| enableTraceDebug = false |
There was a problem hiding this comment.
remove from the minimal toml config
There was a problem hiding this comment.
I will remove it .
| logFilename = "" | ||
|
|
||
| #MB. the maximum of log file size | ||
| logMaxSize = 512 No newline at end of file |
There was a problem hiding this comment.
The configuration of the log is duplicated, and the initialization of the log should not belong to CN
There was a problem hiding this comment.
I will remove the duplicate one.
| mempoolFactor = 8 | ||
|
|
||
| #process.Limitation.Size. 10 << 32 = 42949672960 | ||
| processLimitationSize = 42949672960 |
There was a problem hiding this comment.
It is not really necessary to expose this information, you can get the machine's resource information at startup and calculate a reasonable value
1. cago compiler with link system lib, so ignore cgo generate files `/usr/bin/ld` is my local Apple's linker For example: ``` #16 52.59 # github.com/matrixorigin/matrixone/cmd/db-server #16 52.59 /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 #16 52.59 /usr/bin/ld: /tmp/go-link-2126209758/000006.o: in function `_cgo_df8c56550131_Cfunc_Decimal128_Add': #16 52.59 decimal.cgo2.c:(.text+0x71): undefined reference to `Decimal128_Add' #16 52.59 /usr/bin/ld: /tmp/go-link-2126209758/000006.o: in function `_cgo_df8c56550131_Cfunc_Decimal128_AddDecimal64': #16 52.59 decimal.cgo2.c:(.text+0xcd): undefined reference to `Decimal128_AddDecimal64' #16 52.59 /usr/bin/ld: /tmp/go-link-2126209758/000006.o: in function `_cgo_df8c56550131_Cfunc_Decimal128_AddInt64': ``` 2. According to #4535, the `system_vars_config.toml` will be the default config and `make config` do not generate configuration files. So `system_vars_config.toml` should not be ignored. It's related to [optools/images/Dockerfile](https://github.com/matrixorigin/matrixone/blob/main/optools/images/Dockerfile) 3. Add some other generate files, like `gen_config` and ignore generate data at `store/`. 4. Fix config error Approved by: @yingfeng
1. Connect the cn-service with the frontend and the computation engine. 2. Change the configuraion mechanism to the general method. Remove the auto-generated configuration. Approved by: @zhangxu19830126, @yingfeng, @fengttt, @aptend, @reusee, @nnsgmsone, @lni
1. cago compiler with link system lib, so ignore cgo generate files `/usr/bin/ld` is my local Apple's linker For example: ``` #16 52.59 # github.com/matrixorigin/matrixone/cmd/db-server #16 52.59 /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 #16 52.59 /usr/bin/ld: /tmp/go-link-2126209758/000006.o: in function `_cgo_df8c56550131_Cfunc_Decimal128_Add': #16 52.59 decimal.cgo2.c:(.text+0x71): undefined reference to `Decimal128_Add' #16 52.59 /usr/bin/ld: /tmp/go-link-2126209758/000006.o: in function `_cgo_df8c56550131_Cfunc_Decimal128_AddDecimal64': #16 52.59 decimal.cgo2.c:(.text+0xcd): undefined reference to `Decimal128_AddDecimal64' #16 52.59 /usr/bin/ld: /tmp/go-link-2126209758/000006.o: in function `_cgo_df8c56550131_Cfunc_Decimal128_AddInt64': ``` 2. According to matrixorigin#4535, the `system_vars_config.toml` will be the default config and `make config` do not generate configuration files. So `system_vars_config.toml` should not be ignored. It's related to [optools/images/Dockerfile](https://github.com/matrixorigin/matrixone/blob/main/optools/images/Dockerfile) 3. Add some other generate files, like `gen_config` and ignore generate data at `store/`. 4. Fix config error Approved by: @yingfeng
What type of PR is this?
Which issue(s) this PR fixes:
issue #
What this PR does / why we need it: