The problem is highlighted in the comment at the top of the code "Keying off of msg ID and amount may be sufficient....". This will not be sufficient during reindex operations. If the reindex is happening due to a bug in amount handlers such that a message returns a different amount, this will lead to data duplication.
We do create or update operations on the TaxableTransaction data type:
https://github.com/DefiantLabs/cosmos-indexer/blob/8ce9576bb5f4bd837c1359d4eede52da48fbb42f/db/db.go#L283-L309
The problem is highlighted in the comment at the top of the code "Keying off of msg ID and amount may be sufficient....". This will not be sufficient during reindex operations. If the reindex is happening due to a bug in amount handlers such that a message returns a different amount, this will lead to data duplication.