Couchbase meta xattr channels field

Hi Team,
Need some clarification on the xattrs._sync.channels field. for each channel change we see seq/rev update. Is there a way to limit these updates or ignore this? for one of our document we have more channels( >1000) and this update is creating issue.

{
“meta”: {
“id”: “P.D::5_US”,
“rev”: “57203-175d20902a4d00000000000002000000”,
“expiration”: 0,
“flags”: 33554432,
“type”: “json”
},
“xattrs”: {
“_sync”: {
“rev”: “5608-934c0dd92da48e61eb044a5fbaaafb37”,
“sequence”: 2408777922,
“recent_sequences”: [
2408718021,
2408719496,
2408720324,
2408722780,
2408726956,
2408731396,
2408742561,
2408745090,
2408777922
],
“history”: {
“revs”: [
“5608-934c0dd92da48e61eb044a5fbaaafb37”,
“5607-cc8140f6b68a2157bfea2cfb71441f03”
],
“parents”: [
1,
-1
],
“channels”: [
[
“P.D.038196”,
“P.D.068074”,
“P.D.068133”,
“P.D.068135”,
“P.D.068140”,
“P.D.068142”,
“P.D.068143”,
“P.D.068152”,
“P.D.068154”,
“P.D.068158”,
“P.D.068161”,
“P.D.068173”,
“P.D.068178”,
“P.D.068180”,
“P.D.068183”,
“P.D.068197”,
“P.D.068198”,
“P.D.068203”,
“P.D.068204”,
“P.D.068205”,
“P.D.068206”,
“P.D.068215”,
“P.D.068217”,
“P.D.068232”,
“P.D.068303”,
“P.D.068308”,
“P.D.068309”,
“P.D.068334”,
“P.D.068340”,
“P.D.068343”,
“P.D.068344”,
“P.D.068349”,
“P.D.068351”,
“P.D.068358”,
“P.D.068370”,
“P.D.068371”,
“P.D.068372”,
“P.D.068380”,
“P.D.068382”,
“P.D.068384”,
“P.D.068386”,
“P.D.068398”,
“P.D.068399”,
“P.D.068404”,
“P.D.068406”,
“P.D.068445”,
“P.D.068446”,
“P.D.068456”,
“P.D.068465”,
“P.D.068467”,
“P.D.068472”,
“P.D.068475”,
“P.D.068476”,
“P.D.068478”,
“P.D.068481”,
“P.D.068483”,
“P.D.068488”,
“P.D.068492”,
“P.D.068495”,
“P.D.068497”,
“P.D.068498”,
“P.D.068500”,
“P.D.068501”,
“P.D.068539”,
“P.D.068540”,
“P.D.068546”,
“P.D.068556”,
“P.D.068558”,
“P.D.068617”,
“P.D.068621”,
“P.D.068624”,
“P.D.068626”,
“P.D.068632”,
“P.D.068657”,
“P.D.068664”,
“P.D.068679”,
“P.D.068683”,
“P.D.068688”,
“P.D.068693”,
“P.D.068697”,
“P.D.068700”,
“P.D.068866”,
“P.D.068878”,
“P.D.068889”,
“P.D.069077”,
“P.D.069095”,
“P.D.069099”,
“P.D.069112”,
“P.D.069114”,
“P.D.069118”,
“P.D.069125”,
“P.D.069127”,
“P.D.069129”,
“P.D.069130”,
“P.D.069140”,
“P.D.069142”,
“P.D.069145”,
“P.D.069146”,
“P.D.069147”,
“P.D.069150”,
“P.D.069152”,
“P.D.069155”,
“P.D.069157”,
“P.D.069158”,
“P.D.069159”,
“P.D.069167”,
“P.D.069169”,
“P.D.069174”,
“P.D.069176”,
“P.D.069181”,
“P.D.069182”,
“P.D.069186”,
“P.D.069188”,
“P.D.069191”,
“P.D.069196”,
“P.D.069198”,
“P.D.069200”,
“P.D.069201”,
“P.D.069231”,
“P.D.069232”,
“P.D.069233”,
“P.D.069234”,
“P.D.069236”,
“P.D.069237”,
“P.D.069240”,
“P.D.069241”,
“P.D.069245”,
“P.D.069268”,
“P.D.069319”,
“P.D.069320”,
“P.D.069321”,
“P.D.069322”,
“P.D.069334”,
“P.D.069335”,
“P.D.069345”,
“P.D.069346”,
“P.D.069350”,
“P.D.069351”,
“P.D.069352”,
“P.D.069363”,
“P.D.069365”,
“P.D.069366”,
“P.D.069367”,
“P.D.069371”,
“P.D.069372”,
“P.D.069373”,
“P.D.069376”,
“P.D.069377”,
“P.D.069414”,
“P.D.069452”,
“P.D.069453”,
“P.D.069455”,
“P.D.069457”,
“P.D.069501”,
“P.D.069515”,
“P.D.069516”,
“P.D.069518”,
“P.D.069519”,
“P.D.069521”,
“P.D.069523”,
“P.D.069525”,
“P.D.069526”,
“P.D.069528”,
“P.D.069541”,
“P.D.069611”,
“P.D.069613”,
“P.D.069617”,
“P.D.069618”,
“P.D.069621”,
“P.D.069624”,
“P.D.069625”,
“P.D.069626”,
“P.D.069627”,
“P.D.069630”,
“P.D.069643”,
“P.D.069644”,
“P.D.069649”,
“P.D.069655”,
“P.D.069656”,
“P.D.069659”,
“P.D.069662”,
“P.D.069676”,
“P.D.070552”,
“P.D.071006”,
“P.D.071485”,
“P.D.075278”,
“P.D.078432”,
“P.D.080918”,
“P.D.081225”,
“P.D.081496”,
“P.D.081497”,
“P.D.084323”,
“P.D.084416”,
“P.D.084435”,
“P.D.084772”,
“P.D.085261”,
“T.60025280”,
“T.60025284”,
“T.60025285”,
“T.60025286”,
“T.60035136”,
“T.60035137”,
“T.60035722”,
“T.60035724”,
“T.60035726”,
“T.60035727”,
“T.60035730”,
“T.60035772”,
“T.60035773”,
“T.60038338”,
“T.60038351”,
“T.60038352”,
“T.60039957”,
“T.60040732”
],
[
“P.D.038196”,
“P.D.068074”,
“P.D.068133”,
“P.D.068135”,
“P.D.068140”,
“P.D.068142”,
“P.D.068143”,
“P.D.068152”,
“P.D.068154”,
“P.D.068158”,
“P.D.068161”,
“P.D.068173”,
“P.D.068178”,
“P.D.068180”,
“P.D.068183”,
“P.D.068197”,
“P.D.068198”,
“P.D.068203”,
“P.D.068204”,
“P.D.068205”,
“P.D.068206”,
“P.D.068215”,
“P.D.068217”,
“P.D.068232”,
“P.D.068303”,
“P.D.068308”,
“P.D.068309”,
“P.D.068334”,
“P.D.068340”,
“P.D.068343”,
“P.D.068344”,
“P.D.068349”,
“P.D.068351”,
“P.D.068358”,
“P.D.068370”,
“P.D.068371”,
“P.D.068372”,
“P.D.068380”,
“P.D.068382”,
“P.D.068384”,
“P.D.068386”,
“P.D.068398”,
“P.D.068399”,
“P.D.068404”,
“P.D.068406”,
“P.D.068445”,
“P.D.068446”,
“P.D.068456”,
“P.D.068465”,
“P.D.068467”,
“P.D.068472”,
“P.D.068475”,
“P.D.068476”,
“P.D.068478”,
“P.D.068481”,
“P.D.068483”,
“P.D.068488”,
“P.D.068492”,
“P.D.068495”,
“P.D.068497”,
“P.D.068498”,
“P.D.068500”,
“P.D.068501”,
“P.D.068539”,
“P.D.068540”,
“P.D.068546”,
“P.D.068556”,
“P.D.068558”,
“P.D.068617”,
“P.D.068621”,
“P.D.068624”,
“P.D.068626”,
“P.D.068632”,
“P.D.068657”,
“P.D.068664”,
“P.D.068679”,
“P.D.068683”,
“P.D.068688”,
“P.D.068693”,
“P.D.068697”,
“P.D.068700”,
“P.D.068866”,
“P.D.068878”,
“P.D.068889”,
“P.D.069077”,
“P.D.069095”,
“P.D.069099”,
“P.D.069112”,
“P.D.069114”,
“P.D.069118”,
“P.D.069125”,
“P.D.069127”,
“P.D.069129”,
“P.D.069130”,
“P.D.069140”,
“P.D.069142”,
“P.D.069145”,
“P.D.069146”,
“P.D.069147”,
“P.D.069150”,
“P.D.069152”,
“P.D.069155”,
“P.D.069157”,
“P.D.069158”,
“P.D.069159”,
“P.D.069167”,
“P.D.069169”,
“P.D.069174”,
“P.D.069176”,
“P.D.069181”,
“P.D.069182”,
“P.D.069186”,
“P.D.069188”,
“P.D.069191”,
“P.D.069196”,
“P.D.069198”,
“P.D.069200”,
“P.D.069201”,
“P.D.069231”,
“P.D.069232”,
“P.D.069233”,
“P.D.069234”,
“P.D.069236”,
“P.D.069237”,
“P.D.069240”,
“P.D.069241”,
“P.D.069245”,
“P.D.069268”,
“P.D.069319”,
“P.D.069320”,
“P.D.069321”,
“P.D.069322”,
“P.D.069334”,
“P.D.069335”,
“P.D.069345”,
“P.D.069346”,
“P.D.069350”,
“P.D.069351”,
“P.D.069352”,
“P.D.069363”,
“P.D.069365”,
“P.D.069366”,
“P.D.069367”,
“P.D.069371”,
“P.D.069372”,
“P.D.069373”,
“P.D.069376”,
“P.D.069377”,
“P.D.069414”,
“P.D.069452”,
“P.D.069453”,
“P.D.069455”,
“P.D.069457”,
“P.D.069501”,
“P.D.069515”,
“P.D.069516”,
“P.D.069518”,
“P.D.069519”,
“P.D.069521”,
“P.D.069523”,
“P.D.069525”,
“P.D.069526”,
“P.D.069528”,
“P.D.069541”,
“P.D.069611”,
“P.D.069613”,
“P.D.069617”,
“P.D.069618”,
“P.D.069621”,
“P.D.069624”,
“P.D.069625”,
“P.D.069626”,
“P.D.069627”,
“P.D.069630”,
“P.D.069643”,
“P.D.069644”,
“P.D.069649”,
“P.D.069655”,
“P.D.069656”,
“P.D.069659”,
“P.D.069662”,
“P.D.069676”,
“P.D.070552”,
“P.D.071006”,
“P.D.071485”,
“P.D.075278”,
“P.D.078432”,
“P.D.080918”,
“P.D.081225”,
“P.D.081496”,
“P.D.081497”,
“P.D.084323”,
“P.D.084416”,
“P.D.084435”,
“P.D.084772”,
“P.D.085261”,
“T.60025280”,
“T.60025284”,
“T.60025285”,
“T.60025286”,
“T.60035136”,
“T.60035137”,
“T.60035722”,
“T.60035724”,
“T.60035726”,
“T.60035727”,
“T.60035730”,
“T.60035772”,
“T.60035773”,
“T.60038338”,
“T.60038351”,
“T.60038352”,
“T.60039957”
]
]
},
“channels”: {
** “T.56731555”: {**
** “seq”: 1914428841,**
** “rev”: “3100-e70f03147244ef035c86aa199a4671c2”**
** },**
“T.56235765”: {
“seq”: 1820707883,
“rev”: “1844-1b175ef53d80a934f1d36af6e1b71915”
},
“T.55516742”: {
“seq”: 1710652854,
“rev”: “1159-c6ccb9f1020ccf7af2f75815e3d1bafb”
},
“T.56755650”: {
“seq”: 1914428841,
“rev”: “3100-e70f03147244ef035c86aa199a4671c2”
},

    "P.D.069626": null,
    "T.60035727": null,
    "P.D.068488": null,
    "P.D.068500": null,
  },
  "cas": "0x00004d2a90205d17",
  "value_crc32c": "0x714980ac",
  "time_saved": "2023-05-08T04:20:29.281204847-05:00"
}

}
}

@nagarajan_subbaraj , Depending what version of SG your running you’ll probably end up reaching the soft limit of xattrs storing about 1.5MB of data. Sync Gateway will store about 10 versions of the channel in the _sync history which in your case might hit this limit. When and if you reach that limit SG will stop processing(channeling) the document onUpdate.

Solution1:
have less channels
Solution2:
change the rev limit history to 5 or less.
How to change SG rev limits - Docs: Database Configuration | Couchbase Docs

Hi @househippo ,
already we have rev limit is set as “2” . Is there a way we just keep the channel name alone rather than rev/seq value in the object?
“T.56731555”: {
“seq”: 1914428841,
“rev”: “3100-e70f03147244ef035c86aa199a4671c2”
},

Thanks.