HNHacker News
TopNewBestAskShowJobs

kingluo

62 karma · joined August 31, 2022

submissionscomments
kingluo··on How to read variables optimized out in GDB?
Yes, if there is a call before the instruction, you should check if it changes the register you want. Particular case is particular analysis.
kingluo··on Implement Etcd Watch in PostgreSQL
Yes, it does so in our company. The etcd is somehow heavyweight to be the configuration center. And event more, the postgresql could be deployed in de-centralized cluster just like what etcd does, via some tools (e.g. raft-based failover agents) and configurations (I helped my customers to achieve this goal, but the solution is not open source yet).
kingluo··on Implement Etcd Watch in PostgreSQL
Yes, the DP (data plane) in the demo acts as reverse proxy, it routes the downstream http request to the upstream according to the configuration. The CP (control plane) just translates the json configuration to sql and get it executed in the postgresql.
kingluo··on Lua-Resty-Inspect
It's useful to set arbitrary breakpoint in any lua file to inspect the context infomation, e.g. print local variables if some condition satisfied.

In this way, you don't need to modify the source codes of your project, and just get diagnose infomation on demand, i.e. dynamic logging.

This library supports setting breakpoints within both interpretd function and jit compiled function. The breakpoint could be at any position within the function. The function could be global/local/module/ananymous.

Features:

set breakpoint at any position

dynamic breakpoint

Customized breakpoint handler

you could define one-shot breakpoint

work for jit compiled function

if function reference specified, then performance impact is only bound to that function

if all breakpoints deleted, jit could recover