1

I have a system that writes some rows to Redshift. As soon as it's done (using the JDBC, so as soon as the line of code finishes), we send an id to a queue and another system picks up this id and reads these rows and related rows from Redshift.

This reading usually happens in the same second. The problem is, about 10% of the time it can't find the data that was (apparently) just written. The data is definitely there. Reprocessing these items at a later date gains different (correct) results.

So, my question is does Redshift guarantee immediate data consistency or does our system simply have to wait before reading? And if it has to wait, for how long?

4

2 に答える 2

0

Redshift から確認を受け取るまで、書き込まれた行を考慮すべきではないと思います。

時間は、クラスターの負荷、そのテーブルへの他の書き込みなどによって異なる場合があります。

ID をキューに送信する前に、JDBC 経由の成功確認を待ってみてください。

于 2013-11-19T16:15:26.577 に答える
0

変更がコミットされると利用できるようになりますが、自動コミットの動作により、INSERT/UPDATE が完了してからコミットが完了するまでの間に何らかの遅延が発生している可能性があります。

データベースの変更をトランザクションにラップし、COMMIT が完了するのを待ってから、参照した他のシステムにメッセージを送信することをお勧めします。

于 2014-02-13T21:22:49.690 に答える