Skip to content

Commit a8f7c56

Browse files
committed
unify and illustrate the error reporting when fail to get partition id in OCP mode
1 parent 290a73c commit a8f7c56

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/main/java/com/alipay/oceanbase/rpc/location/model/partition/ObHashPartDesc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public List<Long> getPartIds(Object startRowObj, boolean startInclusive, Object
195195
} catch (IllegalArgumentException e) {
196196
logger.error(LCD.convert("01-00002"), e);
197197
throw new IllegalArgumentException(
198-
"ObHashPartDesc get part id come across illegal params", e);
198+
"ObHashPartDesc failed to get part id because of illegal arguments", e);
199199
}
200200
}
201201

@@ -258,7 +258,7 @@ public Long getPartId(List<Object> rows, boolean consistency) {
258258
}
259259
} catch (IllegalArgumentException e) {
260260
throw new IllegalArgumentException(
261-
"ObHashPartDesc get part id come across illegal params", e);
261+
"ObHashPartDesc failed to get part id because of illegal arguments", e);
262262
}
263263
return partId;
264264
}

src/main/java/com/alipay/oceanbase/rpc/location/model/partition/ObKeyPartDesc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public List<Long> getPartIds(Object startRowObj, boolean startInclusive, Object
176176
} catch (IllegalArgumentException e) {
177177
logger.error(LCD.convert("01-00002"), e);
178178
throw new IllegalArgumentException(
179-
"ObKeyPartDesc get part id come across illegal params", e);
179+
"ObKeyPartDesc failed to get part id because of illegal arguments", e);
180180
}
181181
}
182182

@@ -243,7 +243,7 @@ public Long getPartId(List<Object> rows, boolean consistency) {
243243
} catch (IllegalArgumentException e) {
244244
logger.error(LCD.convert("01-00023"), e);
245245
throw new IllegalArgumentException(
246-
"ObKeyPartDesc get part id come across illegal params", e);
246+
"ObKeyPartDesc failed to get part id because of illegal arguments", e);
247247
}
248248
}
249249

src/main/java/com/alipay/oceanbase/rpc/location/model/partition/ObListPartDesc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public Long getPartId(List<Object> rows, boolean consistency) {
161161
} catch (IllegalArgumentException e) {
162162
logger.error(LCD.convert("01-00001"), e);
163163
throw new IllegalArgumentException(
164-
"ObListPartDesc get part id come across illegal params", e);
164+
"ObListPartDesc failed to get part id because of illegal arguments", e);
165165
}
166166

167167
}

src/main/java/com/alipay/oceanbase/rpc/location/model/partition/ObRangePartDesc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public Long getPartId(Object... row) {
256256
} catch (IllegalArgumentException e) {
257257
RUNTIME.error(LCD.convert("01-00025"), e);
258258
throw new IllegalArgumentException(
259-
"ObRangePartDesc get part id come across illegal params", e);
259+
"ObRangePartDesc failed to get part id because of illegal arguments", e);
260260
}
261261

262262
}

src/main/resources/oceanbase-table-client/log-codes.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
01-00001=ObListPartDesc get part id come across illegal params
2-
01-00002=ObHashPartDesc get part id come across illegal params
1+
01-00001=ObListPartDesc failed to get part id because of illegal arguments
2+
01-00002=ObHashPartDesc failed to get part id because of illegal arguments
33
01-00003=Exception caught!
44
01-00004=close obTable {} error
55
01-00005=fail to decode proxyro password, errMsg={}
@@ -20,9 +20,9 @@
2020
01-00020=failed to get table entry key={} original tableEntry={}
2121
01-00021=Exception caught when processing response, id = {}
2222
01-00022=Exception caught when executing invoke callback, id={}
23-
01-00023=ObKeyPartDesc get part id come across illegal params
23+
01-00023=ObKeyPartDesc failed to get part id because of illegal arguments
2424
01-00024=failed to cast obj, obj={}, types={}
25-
01-00025=ObRangePartDesc get part id come across illegal params
25+
01-00025=ObRangePartDesc failed to get part id because of illegal arguments
2626
01-00026=Batch Concurrent Execute Error
2727
01-00027=fail to refresh server LDC from remote url={}
2828
01-00028=partition num={} has no leader partitionEntry={} original tableEntry={}

0 commit comments

Comments
 (0)