# Remove obsolete hinting code in proxy

XMLWordPrintable

## Details

• Type: Story
• Status: Won't Fix
• Resolution: Done
• Fix Version/s: None
• Component/s: None
• Labels:
None
• Story Points:
1
• Sprint:
DB_W16_01
• Team:
Data Access and Database

## Description

Remove now dead code related to sending hints from proxy to czar

## Activity

Hide
Fabrice Jammes added a comment -

MysqlProxy hints aren't used now in C++ code:

  hintsToPassArr["client_dst_name"] = proxy.connection.client.dst.name  hintsToPassArr["server_thread_id"] = proxy.connection.server.thread_id 

I think the C++ killQuery() function might need the second one which is the thread id on proxy. It seems the first one is always proxy-name:proxy-port, so it may not be useful to run killQuery().

Shall I remove both because it's unused now, or I shall keep them untouched until we test killQuery()?

Thanks,

Fabrice

Show
Fabrice Jammes added a comment - Hi Andy Salnikov , MysqlProxy hints aren't used now in C++ code: hintsToPassArr["client_dst_name"] = proxy.connection.client.dst.name hintsToPassArr["server_thread_id"] = proxy.connection.server.thread_id I think the C++ killQuery() function might need the second one which is the thread id on proxy. It seems the first one is always proxy-name:proxy-port, so it may not be useful to run killQuery(). Shall I remove both because it's unused now, or I shall keep them untouched until we test killQuery()? Thanks, Fabrice
Hide
Andy Salnikov added a comment -

Fabrice, hints are still used by C++ code, please do not remove them. You are right that client_dst_name is always the same, we may want to re-think how we that in the future but currently it's still being used by czar code. server_thread_id is needed by submitQuery. killQuery() has that ID as a part of the query itself so we don't need to pass it separately. killQuery() has been tested and works OK.

Show
Andy Salnikov added a comment - Fabrice, hints are still used by C++ code, please do not remove them. You are right that client_dst_name is always the same, we may want to re-think how we that in the future but currently it's still being used by czar code. server_thread_id is needed by submitQuery. killQuery() has that ID as a part of the query itself so we don't need to pass it separately. killQuery() has been tested and works OK.
Hide
Fabrice Jammes added a comment -

Ok Andy Salnikov you're right, thanks. Maybe it can even be useful to keep clientId if we have multimaster setup?

Jacek Becla, after Andy advice, I don't really see any important code to remove here.

I'll only see some possible minor cleanup, I'll need to have a deeper look to choose what to do:

• remove or log unused error message in ConfigMap.get() (depending on the way it is called in the code)
• use the same way to read all hints in submitQuery (i.e. do not use ConfigMap to read "db"), if it makes code easy to read.
Show
Fabrice Jammes added a comment - Ok Andy Salnikov you're right, thanks. Maybe it can even be useful to keep clientId if we have multimaster setup? Jacek Becla , after Andy advice, I don't really see any important code to remove here. I'll only see some possible minor cleanup, I'll need to have a deeper look to choose what to do: remove or log unused error message in ConfigMap.get() (depending on the way it is called in the code) use the same way to read all hints in submitQuery (i.e. do not use ConfigMap to read "db"), if it makes code easy to read.
Hide
Jacek Becla added a comment -

Fabrice, I think what this story referred to (back in May of last year when i created it) was removed in DM-3952.

Show
Jacek Becla added a comment - Fabrice, I think what this story referred to (back in May of last year when i created it) was removed in DM-3952 .

## People

• Assignee:
Fabrice Jammes
Reporter:
Fritz Mueller
Watchers:
Andy Salnikov, Fabrice Jammes, Jacek Becla