Skip to content

Remove lengthEnvVariable for Column as it never works as expected#9952

Merged
kezhenxu94 merged 1 commit intoapache:masterfrom
kezhenxu94:bugfix/dbthreshold/lengh
Nov 12, 2022
Merged

Remove lengthEnvVariable for Column as it never works as expected#9952
kezhenxu94 merged 1 commit intoapache:masterfrom
kezhenxu94:bugfix/dbthreshold/lengh

Conversation

@kezhenxu94
Copy link
Member

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

This was introduced in #5238 and it never works as expected so I just remove this and won't consider it as breaking change.

In #5238 we meant to add lengthEnvVariable as an mechanism to override the column length, but the env var it uses is SW_SLOW_DB_THRESHOLD, which is the duration threshold instead of length threshold, what's more, the content of SW_SLOW_DB_THRESHOLD is something like default:200,mongodb:100 but StorageModels always tries to parse the content of SW_SLOW_DB_THRESHOLD as an integer, which causes the following errors

2022-11-12 04:02:25,306 org.apache.skywalking.oap.server.core.storage.model.StorageModels 164 [main] ERROR [] - [9.3.0-SNAPSHOT-7c8867b] Model [top_n_cache_read_command] Column [statement], illegal value default:0,mongodb:100 of column length from system env [SW_SLOW_DB_THRESHOLD]
2022-11-12 04:02:25,311 org.apache.skywalking.oap.server.core.storage.model.StorageModels 164 [main] ERROR [] - [9.3.0-SNAPSHOT-7c8867b] Model [top_n_cache_write_command] Column [statement], illegal value default:0,mongodb:100 of column length from system env [SW_SLOW_DB_THRESHOLD]
2022-11-12 04:02:25,312 org.apache.skywalking.oap.server.core.storage.model.StorageModels 164 [main] ERROR [] - [9.3.0-SNAPSHOT-7c8867b] Model [top_n_database_statement] Column [statement], illegal value default:0,mongodb:100 of column length from system env [SW_SLOW_DB_THRESHOLD]

@kezhenxu94 kezhenxu94 added bug Something isn't working and you are sure it's a bug! backend OAP backend related. labels Nov 12, 2022
@kezhenxu94 kezhenxu94 added this to the 9.3.0 milestone Nov 12, 2022
@kezhenxu94 kezhenxu94 requested a review from wu-sheng November 12, 2022 04:58
@kezhenxu94 kezhenxu94 merged commit d3d756b into apache:master Nov 12, 2022
@kezhenxu94 kezhenxu94 deleted the bugfix/dbthreshold/lengh branch November 12, 2022 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. bug Something isn't working and you are sure it's a bug!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants