Posts

Showing posts from June, 2019

Performance benchmark your code

I stumbled upon this site, http://jsben.ch/hyj65 basically it's allowing you to compare your code side by side with variations of the code and see the speed of it and calculate performance gain on the fly.

Unix quick tip - tar with progress

Image
tar with progress bar tar cf - /folder-with-big-files -P | pv -s $(du -sb /folder-with-big-files | awk '{print $1}') | gzip > big-files.tar.gz to install pv first we need to add the repo create /etc/yum.repos.d/ivarch.repo : [ivarch] name=RPMs from ivarch.com baseurl=http://www.ivarch.com/programs/rpms/$basearch/ enabled=1 gpgcheck=1 import public key rpm --import http://www.ivarch.com/personal/public-key.txt yum install pv -y trying it out

Oracle Goldengate QuickTip

Assuming you have a set of extract and replicate process that you would like to reset after they have been running for a while, assuming the prefix for the trail file to be ex extract process: eproc replicate process: rproc trail file prefix: ex stop or kill stop eproc  stop rproc alter eproc, begin now alter eproc, etrollover normally we can simply do the following for rproc alter rproc, begin now but for some occasion, we may have discrepancy in terms of seqno of the trail file between the extract and replicat process, in this case, figure out the file extract started with, say is 300, then we do alter replicat rproc extseqno 300 alter replicat rproc extrba 0 start rproc verify the process is running fine by seeing if the processes are extract/replicating anything stats <process>

MongoDB Quick Note: BI Connector Issue

This is just a quick note of what can stop mongosqld from working properly that I wasn't aware of. Background: My work runs everything mongodb inside of docker containers, so sometimes it's not as straight forward to see immediately of what's preventing your container from working properly What happened: I ran into issue that my container does not stay up after I updated my drdl to reflect new fields introduced to the underlying collection. How to debug: Go to the host server, copy out entrypoint.sh and add sleep 100000000 to before mongosqld is executed. This force the container to stay up for us to look into issue. Cause of the issue: When I updated the drdl, I used tab instead of space, which is causing the mongsqld to error out Fix: Just replace tab with space and everything is back to normal