| 287 | } |
| 288 | |
| 289 | func getOldRevisionJSONAndMeta(payload []byte) (jsonBody []byte, kvPairs map[string][]byte, err error) { |
| 290 | body, meta, err := sgbucket.DecodeValueWithAllXattrs(payload) |
| 291 | if err != nil { |
| 292 | return nil, nil, err |
| 293 | } |
| 294 | return body, meta, nil |
| 295 | } |
| 296 | |
| 297 | // Makes a backup of revision body for use by in-flight replications requesting an old revision (for clients not supporting replacementRevs) |
| 298 | func (db *DatabaseCollectionWithUser) backupRevisionJSON(ctx context.Context, docId, oldRev string, oldBody []byte, channels base.Set, deleted bool) { |