Question

I am getting a race condition warning while running multiple imports simultaneously to openTSDB. Following is one of the log sequences showing the race condition.

2013-08-21 14:34:24,745 INFO [main] UniqueId: Creating an ID for kind='tagv' name='25447'

2013-08-21 14:34:24,747 INFO [main] UniqueId: Got ID=307 for kind='tagv' name='25447'

2013-08-21 14:34:24,752 WARN [main] UniqueId: Race condition: tried to assign ID 307 to tagv:25447, but CAS failed on PutRequest(table="tsdb-uid", key="25447", family="id", qualifiers=["tagv"], values=["\x00\x013"], timestamp=9223372036854775807, lockid=-1, durable=true, bufferable=true, attempt=0, region=null), which indicates this UID must have been allocated concurrently by another TSD. So ID 307 was leaked.

Following questions I have:

  1. Since it is a warning, is it that the record is actually written and not skipped?
  2. At the end it says, 'ID 307 was leaked', so is some other ID assigned to the record?
  3. How to verify that the said record has been written in HBase's table named 'tsdb-uid'? (HBase shell commands, I tried a few but in vain).
Was it helpful?

Solution

This just means that a UID was allocated for nothing, but otherwise everything is fine. If you are worried about the state of your tsdb-uid table, you could run the tsdb uid fsck command, and it will probably report that some UIDs are allocated but unused.

If you see the message only occasionally, you can ignore it. If you see it a lot, then the only undesirable consequence is that you're burning through the UID space faster than you should be, so you may run out of UIDs sooner (there are 16777215 possible UIDs for each of: metric names, tag names, tag values).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top