[bugfix](schema_change) Fix the coredump when doubly write during schema change (#22557)

This commit is contained in:
Lightman
2023-10-19 14:43:18 +08:00
committed by GitHub
parent e77b98be88
commit 159be51ea6
13 changed files with 188 additions and 34 deletions

View File

@ -296,13 +296,14 @@ public class SlotDescriptor {
public TSlotDescriptor toThrift() {
// Non-nullable slots will have 0 for the byte offset and -1 for the bit mask
TSlotDescriptor tSlotDescriptor = new TSlotDescriptor(id.asInt(), parent.getId().asInt(), type.toThrift(), -1,
byteOffset, 0, getIsNullable() ? 0 : -1, ((column != null) ? column.getName() : ""), slotIdx,
byteOffset, 0, getIsNullable() ? 0 : -1, ((column != null) ? column.getNonShadowName() : ""), slotIdx,
isMaterialized);
tSlotDescriptor.setNeedMaterialize(needMaterialize);
tSlotDescriptor.setIsAutoIncrement(isAutoInc);
if (column != null) {
LOG.debug("column name:{}, column unique id:{}", column.getName(), column.getUniqueId());
LOG.debug("column name:{}, column unique id:{}", column.getNonShadowName(), column.getUniqueId());
tSlotDescriptor.setColUniqueId(column.getUniqueId());
tSlotDescriptor.setPrimitiveType(column.getDataType().toThrift());
tSlotDescriptor.setIsKey(column.isKey());
tSlotDescriptor.setColDefaultValue(column.getDefaultValue());
}

View File

@ -491,7 +491,7 @@ public class Column implements Writable, GsonPostProcessable {
public TColumn toThrift() {
TColumn tColumn = new TColumn();
tColumn.setColumnName(this.name);
tColumn.setColumnName(removeNamePrefix(this.name));
TColumnType tColumnType = new TColumnType();
tColumnType.setType(this.getDataType().toThrift());