-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[changelog][server] Fix incoming write schema id (#735)
* [changelog][server] Fix incoming write schema id This is to fix a WC/schema evolution bug. Tests to follow. But the changecapture should contain the schema of the merge result which should be the superset schema not the write compute one.
- Loading branch information
Showing
6 changed files
with
154 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...a-vinci-client/src/main/java/com/linkedin/davinci/store/record/ByteBufferValueRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.linkedin.davinci.store.record; | ||
|
||
/** | ||
* This class encapsulates a value from venice storage accompanied by the schema | ||
* id that was used to serialize the value. | ||
* | ||
* TODO: This class should probably be superseded by {@link ValueRecord}. Unfortunately, | ||
* MANY interfaces in the ingestion path rely on the Bytebuffer interface, where ValueRecord relies on ByteBuf. Until | ||
* we rectify that, this is our stand in. | ||
*/ | ||
public final class ByteBufferValueRecord<T> { | ||
private final T value; | ||
private final int writerSchemaId; | ||
|
||
/** | ||
*/ | ||
public ByteBufferValueRecord(T value, int writerSchemaId) { | ||
this.value = value; | ||
this.writerSchemaId = writerSchemaId; | ||
} | ||
|
||
public T value() { | ||
return value; | ||
} | ||
|
||
public int writerSchemaId() { | ||
return writerSchemaId; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ByteBufferValueRecord[" + "value=" + value + ", " + "writerSchemaId=" + writerSchemaId + ']'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters