[ASTERIXDB-2429] Fix the upsert of primary key index - user model changes: no - storage format changes: no - interface changes: no
Details: - Previously the primary key index is not properly maintained during upsert. Since there is no secondary key in the primary key index, the old value would always point to the primary key, which is always equal to the new value. As a result, the primary key index is nevered maintainined during upsert. - This patch fixes this bug with two changes: First, if there is a primary key index, we would perform upsert anyway no matter whether old value == new value Second, use a boolean variable to indicate whether the operation is upsert or delete since for the primary key index, old value cannot provide such information.