The Story:

Recently, I’m working as a deployment engineer at customer site with my team members. The system under deployment consists of a cluster service, a NoSql database and some client applications which interact with the cluster/database by using the Dynamic Link Library (DLL) provided by the vender.

We were requested to deploy one new module which collects the database usage and health statistics such as running time, average read/write rates, database response delays and etc. Let’s call it Statistics Service as brief. We were also asked to upgrade the DLL for each client programs. I didn’t think too much even a big question mark in my mind: “Why we also need to upgrade the DLL for client for the Statistics Service?”

Everything went well at the beginning, but after deployment, we found that some statistics items were still zero. We re-checked our upgrade process including checking the configuration files, the file md5sums, DLL version numbers. It seems nothing was wrong. We asked the developer in the other city for help but no valuable information still. Then we did the deployment again and still no luck.

After several days, problems were still there. We started to analysis the log of the Statistics Service line by line. We happened to recognize a phenomenon that if the client program creates the connection to the database before the Statistics Service is ready, the Statistics Service won’t initiate statistics data collection for this client. The question popped up in my mind again: “Why we also need to upgrade the DLL for client for the statistics service?”

I made a call to the developer to check why the system has such weird behavior. To my surprise, he said that the clients notify the statistics service via the DLL method calls quietly. And the DLL’s cluster connection method creates a TCP connection to the Statistics Service in the background for the clients. I asked why? He says: “I’m a newcomer; I failed to persuade the developers of the cluster service to monitor the statistics data and notify the Statistics Service. So we added code for collecting the statistics data in the DLL file for client programs which is an easiest and fastest way.” And later I asked another question: “why we still have problems that some statistics items are still zero? We already checked that DLL version is the latest one. ” Again, he managed to surprise me: “We just found that we might released different DLL versions with the same version number before.” Later that day, we received a new DLL and after upgrading, everything went OK!

No, it’s still far away from OK!!!

The Questions:

Why such a version control pitfall happened?

Why does the DLL care about statistics and does weird work furtively?

Why did the vender choose this easiest and fastest design without carefully thinking about the whole system and the consequences?

Further Reading:

What is DLL? http://zh.wikipedia.org/wiki/%E5%8A%A8%E6%80%81%E9%93%BE%E6%8E%A5%E5%BA%93

Lazy Makes Others Busy – a bad experience with DLL的更多相关文章

  1. Optimizing Oracle RAC

    Oracle Real Application Clusters (RAC) databases form an increasing proportion of Oracle database sy ...

  2. 转:Busy Developers' Guide to HSSF and XSSF Features

    Busy Developers' Guide to Features Want to use HSSF and XSSF read and write spreadsheets in a hurry? ...

  3. NFS : device is busy

    unmount [ options ] -f : Force unmount (in case of an unreachable NFS system). -l  : Lazy unmount. D ...

  4. POJ 1337 A Lazy Worker(区间DP, 背包变形)

    Description There is a worker who may lack the motivation to perform at his peak level of efficiency ...

  5. 3 Ways to Force Unmount in Linux Showing “device is busy”

    3 Ways to Force Unmount in Linux Showing “device is busy” Updated August 8, 2019By Bobbin ZachariahL ...

  6. 代码的坏味道(15)——冗余类(Lazy Class)

    坏味道--冗余类(Lazy Class) 特征 理解和维护类总是费时费力的.如果一个类不值得你花费精力,它就应该被删除. 问题原因 也许一个类的初始设计是一个功能完全的类,然而随着代码的变迁,变得没什 ...

  7. Mach-O 的动态链接(Lazy Bind 机制)

    ➠更多技术干货请戳:听云博客 动态链接 要解决空间浪费和更新困难这两个问题最简单的方法就是把程序的模块相互分割开来,形成独立的文件,而不再将它们静态的链接在一起.简单地讲,就是不对那些组成程序的目标文 ...

  8. Pramp - mock interview experience

    Pramp - mock interview experience   February 23, 2016 Read the article today from hackerRank blog on ...

  9. ORA-00054: resource busy and acquire with NOWAIT specified

    删除表时遇到 ORA-00054:资源正忙,要求指定NOWAIT 错误.以前在灾备中心遇到过. 资源被锁定了,没有办法删除. 报错日志:ORA-00054: resource busy and acq ...

随机推荐

  1. AC、HC、AHC、ACT、LS的区别

    http://forum.eet-cn.com/thread!printPreview.jspa?threadID=1200029698&start=0 以245为例,74AC245.74HC ...

  2. 编写一个JavaScript函数 parseQueryString,把URL参数解析为一个对象

    var url="http://www.taobao.com/index.php?key0=0&key1=1&key2=2"; function parseQuer ...

  3. ARM&Linux 下驱动开发第三节

    后台驱动代码如下:比较昨天的,添加了读写指针位置移动操作 #include<linux/init.h> #include<linux/module.h> #include< ...

  4. Codeforces Round #188 (Div. 2) A. Even Odds 水题

    A. Even Odds Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/318/problem/ ...

  5. Eclipse中R文件不能自动生成

       R文件不能自动生成主要是因为编译有错误,这时你想什么办法都是没有用的,clean, fix properties,都不是从根上解决问题.    R文件主要是自动生成资源文件的id的,里边静态子类 ...

  6. MySql之char与varchar

    MySql之char与varchar的差别 char是一种固定长度的类型,varchar则是一种可变长度的类型.它们的差别是:  1. char(M)类型的数据列里.每一个值都占用M个字节.假设某个长 ...

  7. js 处理url中文参数 java端接收处理

    正常情况下当http请求中带有中文参数时,浏览器会自动对中文进行一次编码(按照当前页面的pageEncoding),java端容器会对接收到的参数自动进行一次转码,则request.getParame ...

  8. IIS问题汇总

    1.问题描述   VS和Framework的安装顺序不对导致网站打不开   原因分析   Framework出现问题   解决办法   重新注册Framework版本   a.开始->运行-&g ...

  9. jquery冲突

    今天修改一个项目发现,前辈们自己写的一些方法和jquery冲突了,也就是$的冲突,以至于自己用jquery编写的新功能无法正常使用,细究后发现解决办法如下:使用 noConflict() 方法为 jQ ...

  10. 开发工具 之 PowerDesigner 应用积累

    1.在默认情况下,code与name是联动,修改了name中的数据. 解决方法:设置菜单栏选择"Tools→General Options→Dialog"  中的 "Na ...