Recently, I was going through the repository and had some doubts about the code or its purpose. Not sure if my understanding is right. I hope to get some help from the community.
So my doubt is while ingesting the record in PageServer.
for blk in decoded.blocks.iter() {
self.ingest_decoded_block(modification, lsn, decoded, blk, ctx)
.await?;
}
In ingest_decoded_block function we are creating and adding a NeonWalRecord record for each blk. So NeonWalRecord for each block contains the same Xlogrecord in its rec(bytes). The same is written into the layerfile during datamodification.commit.
This seems like a bloat to me if the xlogrecord contains numerous blocks. If I’m wrong and this has a function, please correct me.