Thanks for reporting this issue Sumana Sathish! This is a very very interesting discovery. I did some debug on this issue and found out the the direct reason for the missing fields is authentication failure. The original user failed to get authentication to get the app report. Checked into the ATS returned message, I can see something like this:
Note that the application creation information has been missing in the returned information. I found that in the level db, there are two <entityType, timestamp, entityId> tuples created with application application_1467931619679_0001, with two different timestamps. The application creation message is associated with a different timestamp.
Checking the code of rolling leveldb, I can see both call-sites of RollingLevelDBTimelineStore#getAndSetStartTime is not properly synchronized, although in the comments it says that it "Should only be called when a lock has been obtained on the entity. " Then for two events on the same application arrive the timeline server concurrently, something like this may happen:
1. put1 checks existing timestamp for the application, no result.
2. put2 checks existing timestamp for the application, no result.
3. put1 set the application entity's timestamp to be its own timestamp
4. put2 override the application entity's timestamp to be its own timestamp.
After the process, put1 will write its data to a key (<entityType, timestamp, entityId>) that has a stale timestamp, which will never be read out since the time stamp is overridden by put 2.
The original LeveldbTimelineStore does not have this problem, because it always grab a lock when it performs getAndSetStartTime.
With regard to fix, probably making getAndSetStartTime synchronized will fix the problem. I'm wondering that making checkStartTimeInDb to be synchronized would also to the trick (since it's the only place in the process to have a read-then-update semantic).
Jonathan Eagles I know you're an expert on rolling leveldb's source code, so if you have any free bandwidth, I truly appreciate your suggestions here. Thanks!