Skip to content

Commit

Permalink
change wording;
Browse files Browse the repository at this point in the history
  • Loading branch information
azeng-netflix committed Jan 17, 2025
1 parent b9fa627 commit 5b8967a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/data-modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ When defined in the schema, primary keys are a part of your data model and drive

Primary keys defined in the schema follow the same convention as primary keys defined for indexes. They consist of one or more [field paths](indexing-querying.md#field-paths), which will auto-expand if they terminate in a `REFERENCE` field.

!!! warning "Primary Key Duplication Can Happen"
By default, Hollow does not enforce the uniqueness of primary keys. User can add multiple records with the same primary key into the data set. To enforce primary key uniqueness, please use the predefined [DuplicateDataDetectionValidator](validation.md#pre-defined-validators) on the producer side.
This enforcement is turned off by default as it comes at a cost of performance (CPU/memory).
!!! warning "Duplidate record validation"
Hollow producer does not dedupe records based on primary key definition, by default. For e.g. if two records with
the same value for primary key field(s) but different values for other field(s) are added to the write state in a
runCycle, both records will be accepted. A consumer querying using primary key will see inconsistent behavior.
Either one of those records can be returned. To address this, Hollow offers the [DuplicateDataDetectionValidator](validation.md#pre-defined-validators), which enforces primary key constraints. This validator
is not enabled by default and must be opted into.

!!! warning "Null values are not supported"
Primary key field(s) cannot have null values. This is not supported as it was not needed. Please be mindful when adding values to primary key fields. This will result in exception similar to below.
Expand Down

0 comments on commit 5b8967a

Please sign in to comment.