RedBeardLab / rediSQL

Redis module that provides a completely functional SQL database
https://redisql.com
Other
1.55k stars 150 forks source link

READONLY You can't write against a read only replica #90

Closed amitnakum closed 4 years ago

amitnakum commented 4 years ago

I setup Redis Replication Master-Slave by loading rediSQL_0.6.0.so module on both.I have configure redis Master for Write operation and Slave for only Read.

I verify Replication Write/Read operation using SET and GET command.I can read value on slave using GET on redis-cli.But when Run Sql style query on slave, i am getting below error, Same Query is running fine on master.

[root@redis ~]# redis-cli -p 637990 127.0.0.1:637990> 127.0.0.1:637990> 127.0.0.1:637990> REDISQL.EXEC xyz "select * FROM test" (error) READONLY You can't write against a read only replica.

I try to google this issue but there is no solution on it.

Can you Help me on this issue.

siscia commented 4 years ago

Can you try to use REDISQL.QUERY instead of REDISQL.EXEC ?

QUERY checks that the query is read-only, hence it should be allowed in the replica.

Using EXEC you could also write in the database, and you should not do so in a replica, have it is not allowed.

I believe that the QUERY command is already in the version 0.6.0 however I would suggest to upgrade if that is possible.

Please let me know how if this helps!

I replied to the same message via email, you didn't receive my email?

Cheers, Simone

amitnakum commented 4 years ago

Dear RedBeardLab/rediSQL,

Thank you so much , It solve my problem.

once again Thank you so much

On Thu, Jan 2, 2020 at 10:35 PM Simone Mosciatti notifications@github.com wrote:

Can you try to use REDISQL.QUERY instead of REDISQL.EXEC ?

QUERY checks that the query is read-only, hence it should be allowed in the replica.

Using EXEC you could also write in the database, and you should not do so in a replica, have it is not allowed.

I believe that the QUERY command is already in the version 0.6.0 however I would suggest to upgrade if that is possible.

Please let me know how if this helps!

I replied to the same message via email, you didn't receive my email?

Cheers, Simone

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RedBeardLab/rediSQL/issues/90?email_source=notifications&email_token=AOFQ6XR2UFC4HNSDSETDLGDQ3YNFFA5CNFSM4KCC73FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH62OWY#issuecomment-570271579, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFQ6XQX5IGXJA3YOU43CBTQ3YNFFANCNFSM4KCC73FA .

-- Thanks & Regards, Amit Nakum | Sr. Support Engineer +91 982482283 | Hangout & Skype: amit.nakum@ecosmob.com [image: Ecosmob Technologies Pvt. Ltd.] http://www.ecosmob.com/

Ecosmob Technologies Pvt. Ltd. https://www.ecosmob.com

VoIP | Web | Mobile | IoT | Big Data

ssdsds https://twitter.com/ecosmob

sasadsdasdasdasdasdas https://twitter.com/ecosmob https://www.facebook.com/Ecosmob https://plus.google.com/+Ecosmob https://www.linkedin.com/company/ecosmob https://in.pinterest.com/ecosmob

-- Disclaimer In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded.

Confidentiality This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error.

Caution for viruses, malware etc. This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems.