In the original design for consistent indexes, we do three phase write. In the first phase, we write full index rows with unverified status, then we write data table rows, and finally we overwrite the index row status on the rows written at the first phase and set it to unverified.
Instead of writing full index row in the first phase, we can do full index row write at the last phase. So, in the first phase, we can just write unverified status for the index row. In the last row, we can do full row index write at the last phase.
This change does not impact the correctness of the design but improves overall design in terms of efficiency. In the presence of concurrent writes, we skip the last write phase. These writes leave the index writes in unverified status. Similarly, if the first or second phase write fails, we do not proceed with the third phase.
Since with this change, we will be writing only the empty column with the unverified status value (i.e., 2) for index tables in these failure cases, the storage usage will be improved as we will write less index data. This change also opens up the solution domain for some problems, e.g., handling replication lag issues (please see