[CONTROLLER-1782] LastCommittedTransactionTime time in GET request for shard is hardcoded to 1969 Created: 19/Oct/17 Updated: 19/Jul/18 Resolved: 19/Jul/18 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | config |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Low |
| Reporter: | Chethana Lakshmanappa | Assignee: | Sai MarapaReddy |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
When you do a GET to fetch the shard details, the "LastCommittedTransactionTime" is always displayed as "1969-12-31 16:00:00.000". Attached Karaf logs. {
"request": {
"mbean": "org.opendaylight.controller:Category=Shards,name=member-1-shard-inventory-config,type=DistributedConfigDatastore",
"type": "read"
},
"value": {
"ReadWriteTransactionCount": 0,
"SnapshotIndex": -1,
"InMemoryJournalLogSize": 7,
"ReplicatedToAllIndex": -1,
"Leader": "member-3-shard-inventory-config",
"LastIndex": 6,
"RaftState": "Follower",
"LastApplied": 6,
"LastCommittedTransactionTime": "1969-12-31 16:00:00.000",
"LastLogIndex": 6,
"LastLeadershipChangeTime": "2017-10-16 14:58:42.985",
"PeerAddresses": "member-2-shard-inventory-config: akka.tcp://opendaylight-cluster-data@clust130vm2:2550/user/shardmanager-config/member-2-shard-inventory-config, member-6-shard-inventory-config: , member-5-shard-inventory-config: , member-3-shard-inventory-config: akka.tcp://opendaylight-cluster-data@clust130vm3:2550/user/shardmanager-config/member-3-shard-inventory-config, member-4-shard-inventory-config: ",
"WriteOnlyTransactionCount": 0,
"FollowerInitialSyncStatus": true,
"FollowerInfo": [],
"FailedReadTransactionsCount": 0,
"Voting": true,
"StatRetrievalTime": "46.92 μs",
"CurrentTerm": 47,
"LastTerm": 41,
"FailedTransactionsCount": 0,
"PendingTxCommitQueueSize": 0,
"VotedFor": "member-3-shard-inventory-config",
"SnapshotCaptureInitiated": false,
"CommittedTransactionsCount": 0,
"TxCohortCacheSize": 0,
"PeerVotingStates": "member-2-shard-inventory-config: true, member-6-shard-inventory-config: false, member-5-shard-inventory-config: false, member-3-shard-inventory-config: true, member-4-shard-inventory-config: false",
"LastLogTerm": 41,
"StatRetrievalError": null,
"CommitIndex": 6,
"SnapshotTerm": -1,
"AbortTransactionsCount": 0,
"ReadOnlyTransactionCount": 0,
"ShardName": "member-1-shard-inventory-config",
"LeadershipChangeCount": 1,
"InMemoryJournalDataSize": 2331
},
"timestamp": 1508435177,
"status": 200
}
|
| Comments |
| Comment by Tom Pantelis [ 19/Jul/18 ] |
|
LastCommittedTransactionTime is not hard-coded - it's initialized to 0 which is interpreted as 1969. It's set by ShardDataTree#finishCommit but only on the shard leader. It will always be 0 on a follower unless the follower eventually becomes the leader. |