diff options
author | Robert Haas | 2022-01-04 19:10:42 +0000 |
---|---|---|
committer | Robert Haas | 2022-01-04 19:12:34 +0000 |
commit | 901d9e24b8f3d34b09d83160424b74569f2c12c8 (patch) | |
tree | e7cccd3105542c21d7e5416291a459167a1b89a2 | |
parent | ed63b554a6f4ad3303b0b2c276ccf59e61234f15 (diff) |
Fix typos and address other review comments from Amul.conveyor
-rw-r--r-- | src/backend/access/conveyor/README | 2 | ||||
-rw-r--r-- | src/backend/access/conveyor/cbmetapage.c | 9 | ||||
-rw-r--r-- | src/backend/access/conveyor/cbxlog.c | 2 | ||||
-rw-r--r-- | src/backend/access/conveyor/conveyor.c | 12 | ||||
-rw-r--r-- | src/include/access/cbfsmpage_format.h | 2 | ||||
-rw-r--r-- | src/include/access/cbindexpage_format.h | 2 | ||||
-rw-r--r-- | src/include/access/cbmetapage_format.h | 2 |
7 files changed, 15 insertions, 16 deletions
diff --git a/src/backend/access/conveyor/README b/src/backend/access/conveyor/README index a500a1cdbc..2c56202423 100644 --- a/src/backend/access/conveyor/README +++ b/src/backend/access/conveyor/README @@ -156,7 +156,7 @@ be bad, but it's not a functional breakage. Note also that running multiple copies of ConveyorBeltVacuum on the same conveyor belt at the same time is a bad plan. They'll contend with each -othr trying to do the same work. Consider preventing this by some means +other trying to do the same work. Consider preventing this by some means (e.g. a self-exclusive heavyweight lock). ConveyorBeltPhysicalTruncate can be used to return disk space to the diff --git a/src/backend/access/conveyor/cbmetapage.c b/src/backend/access/conveyor/cbmetapage.c index 15021e092b..7e9b95f070 100644 --- a/src/backend/access/conveyor/cbmetapage.c +++ b/src/backend/access/conveyor/cbmetapage.c @@ -304,8 +304,7 @@ cb_metapage_get_bounds(CBMetapageData *meta, CBPageNo *oldest_logical_page, * existing entries point to segments that are completely full. If we * needed to know how many entries had been filled in, whether or not any * of the associated storage was in use, we could do that by adding 1 to - * the value computed here here if the entry at that offset is already - * initialized. + * the value computed here if the entry at that offset is already initialized. */ int cb_metapage_get_index_entries_used(CBMetapageData *meta) @@ -552,7 +551,7 @@ cb_metapage_get_obsolete_state(CBMetapageData *meta, * of the index, or follows it by less than the number of pages per * segment. In the latter case, some but not all of the pages in the * oldest payload segment are obsolete. We can only clean up entire - * payload semgents, so in such cases there is nothing to do. + * payload segments, so in such cases there is nothing to do. */ if (istart + pps > olpage) return CBM_OBSOLETE_NOTHING; @@ -615,7 +614,7 @@ cb_metapage_clear_obsolete_index_entry(CBMetapageData *meta, CBSegNo segno, unsigned offset) { - if (meta->cbm_index[offset] != offset) + if (meta->cbm_index[offset] != segno) elog(ERROR, "index entry at offset %u was expected to be %u but found %u", offset, segno, meta->cbm_index[offset]); @@ -659,7 +658,7 @@ cb_metapage_get_fsm_bit(CBMetapageData *meta, CBSegNo segno) uint8 byte; uint8 mask; - if (segno >= CB_METAPAGE_FREESPACE_BYTES * BITS_PER_BYTE) + if (segno >= CB_FSM_SEGMENTS_FOR_METAPAGE) elog(ERROR, "segment %u out of range for metapage fsm", segno); byte = meta->cbm_freespace_map[segno / BITS_PER_BYTE]; diff --git a/src/backend/access/conveyor/cbxlog.c b/src/backend/access/conveyor/cbxlog.c index 2dd030c1ac..76ba5214ac 100644 --- a/src/backend/access/conveyor/cbxlog.c +++ b/src/backend/access/conveyor/cbxlog.c @@ -9,7 +9,7 @@ * * Copyright (c) 2016-2021, PostgreSQL Global Development Group * - * src/backend/access/conveyor/cbmodify.c + * src/backend/access/conveyor/cbxlog.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/access/conveyor/conveyor.c b/src/backend/access/conveyor/conveyor.c index 090fccc3c0..e4ae068768 100644 --- a/src/backend/access/conveyor/conveyor.c +++ b/src/backend/access/conveyor/conveyor.c @@ -656,7 +656,7 @@ ConveyorBeltGetNewPage(ConveyorBelt *cb, CBPageNo *pageno) /* * Actually insert a new page into the conveyor belt. * - * See ConveyorBeltGetNewPage for the intended usage of this fucntion. + * See ConveyorBeltGetNewPage for the intended usage of this function. */ void ConveyorBeltPerformInsert(ConveyorBelt *cb, Buffer buffer) @@ -715,7 +715,7 @@ ConveyorBeltPerformInsert(ConveyorBelt *cb, Buffer buffer) /* * Clean up following the insertion of a new page into the conveyor belt. * - * See ConveyorBeltGetNewPage for the intended usage of this fucntion. + * See ConveyorBeltGetNewPage for the intended usage of this function. */ void ConveyorBeltCleanupInsert(ConveyorBelt *cb, Buffer buffer) @@ -1050,7 +1050,7 @@ ConveyorBeltVacuum(ConveyorBelt *cb) /* * If on the previous pass through the loop we concluded that we need - * to free a payload segment refrenced by the metapage and if that no + * to free a payload segment referenced by the metapage and if that no * longer seems like the thing we need to do, then release any lock and * pin we may have acquired in preparation for freeing that payload * segment. @@ -1276,7 +1276,7 @@ ConveyorBeltClearIndexSegmentEntries(ConveyorBelt *cb, Buffer metabuffer, { if (segoff == 0) elog(ERROR, - "conveyor belt index page at segno %u offset 0 should be initialied", + "conveyor belt index page at segno %u offset 0 should be initialized", index_segment); if (*next_index_segment != CB_INVALID_SEGMENT) elog(ERROR, @@ -1432,7 +1432,7 @@ ConveyorBeltClearIndexSegmentEntries(ConveyorBelt *cb, Buffer metabuffer, } /* - * Attempt to remve the oldest index segment. + * Attempt to remove the oldest index segment. * * The return value is the segment number of the oldest index segment that * remains after the operation has been completed. If no index segments remain @@ -1960,7 +1960,7 @@ ConveyorSearchFSMPages(ConveyorBelt *cb, CBSegNo next_segment, /* * Somehow this FSM page, which at last check was beyond the last * allocated segment, now has no bits free whatsoever. Either we've - * been asleep for an extrordinarily long time while a huge amount of + * been asleep for an extraordinarily long time while a huge amount of * other work has happened, or the data on disk is corrupted, or * there's a bug. */ diff --git a/src/include/access/cbfsmpage_format.h b/src/include/access/cbfsmpage_format.h index 2c072c41a6..5a32a75f91 100644 --- a/src/include/access/cbfsmpage_format.h +++ b/src/include/access/cbfsmpage_format.h @@ -4,7 +4,7 @@ * Actual on-disk format for a conveyor-belt FSM page. * * Backend code should not typically include this file directly, even if - * it's code that is part of the conveyor belt implemenation. Instead, it + * it's code that is part of the conveyor belt implementation. Instead, it * should use the interface routines defined in cbfsmpage.h. * * See src/backend/access/conveyor/README for a general overview of diff --git a/src/include/access/cbindexpage_format.h b/src/include/access/cbindexpage_format.h index 904ad97714..d8d2907630 100644 --- a/src/include/access/cbindexpage_format.h +++ b/src/include/access/cbindexpage_format.h @@ -4,7 +4,7 @@ * Actual on-disk format for a conveyor-belt index page. * * Backend code should not typically include this file directly, even if - * it's code that is part of the conveyor belt implemenation. Instead, it + * it's code that is part of the conveyor belt implementation. Instead, it * should use the interface routines defined in cbindexpage.h. * * See src/backend/access/conveyor/README for a general overview of diff --git a/src/include/access/cbmetapage_format.h b/src/include/access/cbmetapage_format.h index a39ab44949..ab973d67e5 100644 --- a/src/include/access/cbmetapage_format.h +++ b/src/include/access/cbmetapage_format.h @@ -4,7 +4,7 @@ * Actual on-disk format for a conveyor-belt metapage. * * Backend code should not typically include this file directly, even if - * it's code that is part of the conveyor belt implemenation. Instead, it + * it's code that is part of the conveyor belt implementation. Instead, it * should use the interface routines defined in cbmetapage.h. * * See src/backend/access/conveyor/README for a general overview of |