apache / apache/gravitino

[Improvement] Use of regex on error messages can be fragile in DorisExceptionConverter.java

Open
#3,027 11 comments 0 reactions 1 assignee Claimed by @ashwin1596 View on GitHub
good first issue improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 15h
Merged PRs (30d)
315

Description

### What would you like to be improved?

DorisExceptionConverter.java uses a DATABASE_ALREADY_EXISTS_PATTERN_STRING regex to check error messages for databases that already exist. There are several issues with this and regex can be fragile expensive or even a possible DOS vector

### How should we improve?

If possible improve code to not use regexp for this error condition.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.