anchor.diff:              Quota
       end.
   
  -do_default_quota(kv, Memory) ->
  -    KvQuota = (Memory * 3) div 5,
  -    {?MIN_BUCKET_QUOTA, KvQuota};
  -do_default_quota(index, Memory) ->
  -    IndexQuota = (Memory * 3) div 5,
  -    {min_quota(index), IndexQuota};
  -do_default_quota(fts, Memory) ->
  -    FTSQuota = min(Memory div 5, ?MAX_DEFAULT_FTS_QUOTA),
  -    {min_quota(fts), FTSQuota};
  -do_default_quota(cbas, Memory) ->
  -    CBASQuota = Memory div 5,
  -    {min_quota(cbas), CBASQuota}.
  -
  -services_ranking() ->
  -    [kv, cbas, index, fts].
  +calculate_default_quota(kv, Memory) ->
  +    (Memory * 3) div 5;
  +calculate_default_quota(index, Memory) ->
  +    (Memory * 3) div 5;
  +calculate_default_quota(fts, Memory) ->
  +    min(Memory div 5, ?MAX_DEFAULT_FTS_QUOTA);
  +calculate_default_quota(cbas, Memory) ->
  +    Memory div 5.
   
   default_quotas(Services) ->
       %% this is actually bogus, because nodes can be heterogeneous; but that's
  
positive.code:             Error
      end.
  
  -define(MIN_BUCKET_QUOTA, 256).
  -define(MAX_DEFAULT_FTS_QUOTA, 512).
  
  min_quota(index) ->
      256;
  min_quota(fts) ->
  
negative.code:     SetFn(service_to_quota_key(Service), Quota, Cfg).
  
  default_quota(Service, Memory, Max) ->
      Quota = calculate_default_quota(Service, Memory),
      Min = min_quota(Service),
  
      %% note that this prefers enforcing minimum quota which for very small
      %% amounts of RAM can result in combined quota be actually larger than RAM
  