-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tombstone document into Lucene for Noop #30226
Changes from all commits
7bfd4d1
11c2d53
aa6cd3f
8d465a0
e0fe986
4b1b565
c70aa04
0dff89a
47716c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,26 +69,29 @@ public static class SequenceIDFields { | |
public final Field seqNo; | ||
public final Field seqNoDocValue; | ||
public final Field primaryTerm; | ||
public final Field tombstoneField; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't this a softDeleteField? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, this is not a softDeletes field. This field is used by a delete-op and an noop only. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. doh. I got confused. Sorry. |
||
|
||
public SequenceIDFields(Field seqNo, Field seqNoDocValue, Field primaryTerm) { | ||
public SequenceIDFields(Field seqNo, Field seqNoDocValue, Field primaryTerm, Field tombstoneField) { | ||
Objects.requireNonNull(seqNo, "sequence number field cannot be null"); | ||
Objects.requireNonNull(seqNoDocValue, "sequence number dv field cannot be null"); | ||
Objects.requireNonNull(primaryTerm, "primary term field cannot be null"); | ||
this.seqNo = seqNo; | ||
this.seqNoDocValue = seqNoDocValue; | ||
this.primaryTerm = primaryTerm; | ||
this.tombstoneField = tombstoneField; | ||
} | ||
|
||
public static SequenceIDFields emptySeqID() { | ||
return new SequenceIDFields(new LongPoint(NAME, SequenceNumbers.UNASSIGNED_SEQ_NO), | ||
new NumericDocValuesField(NAME, SequenceNumbers.UNASSIGNED_SEQ_NO), | ||
new NumericDocValuesField(PRIMARY_TERM_NAME, 0)); | ||
new NumericDocValuesField(PRIMARY_TERM_NAME, 0), new NumericDocValuesField(TOMBSTONE_NAME, 0)); | ||
} | ||
} | ||
|
||
public static final String NAME = "_seq_no"; | ||
public static final String CONTENT_TYPE = "_seq_no"; | ||
public static final String PRIMARY_TERM_NAME = "_primary_term"; | ||
public static final String TOMBSTONE_NAME = "_tombstone"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we use this as the ground truth in the engine as well? we have a constant in Lucene.java too no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't have the same constant in Lucene or Engine. I am not sure about your suggestion here. Can you elaborate it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nevermind I was confused |
||
|
||
public static class SeqNoDefaults { | ||
public static final String NAME = SeqNoFieldMapper.NAME; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm why is this no good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I restored it.