Boaz Leskes fe43eef1b5 Port Primary Terms to master
Primary terms is a way to make sure that operations replicated from stale primary are rejected by shards following a newly elected primary.

Original PRs adding this to the seq# feature branch  ,  . Unlike those PR, here we take a different approach (based on newer code in master) where the primary terms are stored in the meta data only (and not in `ShardRouting` objects).

Relates to 

Closes 
2016-03-25 12:01:00 +01:00
..