Skip to content

Commit 353c725

Browse files
committed
NEON: Finish Zenith->Neon rename
Even though we're now part of Databricks, let's at least make this part consistent.
1 parent db424d4 commit 353c725

File tree

9 files changed

+53
-53
lines changed

9 files changed

+53
-53
lines changed

src/backend/access/transam/xlog.c

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -679,11 +679,11 @@ static MemoryContext walDebugCxt = NULL;
679679

680680

681681
/*
682-
* Variables read from 'zenith.signal' file.
682+
* Variables read from 'neon.signal' file.
683683
*/
684-
bool ZenithRecoveryRequested = false;
685-
XLogRecPtr zenithLastRec = InvalidXLogRecPtr;
686-
bool zenithWriteOk = false;
684+
bool NeonRecoveryRequested = false;
685+
XLogRecPtr neonLastRec = InvalidXLogRecPtr;
686+
bool neonWriteOk = false;
687687

688688

689689
static void CleanupAfterArchiveRecovery(TimeLineID EndOfLogTLI,
@@ -5439,42 +5439,42 @@ CheckRequiredParameterValues(void)
54395439
}
54405440

54415441
static void
5442-
readZenithSignalFile(void)
5442+
readNeonSignalFile(void)
54435443
{
54445444
int fd;
54455445

5446-
fd = BasicOpenFile(ZENITH_SIGNAL_FILE, O_RDONLY | PG_BINARY);
5446+
fd = BasicOpenFile(NEON_SIGNAL_FILE, O_RDONLY | PG_BINARY);
54475447
if (fd >= 0)
54485448
{
54495449
struct stat statbuf;
54505450
char *content;
54515451
char prev_lsn_str[20];
54525452

54535453
/* Slurp the file into a string */
5454-
if (stat(ZENITH_SIGNAL_FILE, &statbuf) != 0)
5454+
if (stat(NEON_SIGNAL_FILE, &statbuf) != 0)
54555455
ereport(ERROR,
54565456
(errcode_for_file_access(),
54575457
errmsg("could not stat file \"%s\": %m",
5458-
ZENITH_SIGNAL_FILE)));
5458+
NEON_SIGNAL_FILE)));
54595459
content = palloc(statbuf.st_size + 1);
54605460
if (read(fd, content, statbuf.st_size) != statbuf.st_size)
54615461
ereport(ERROR,
54625462
(errcode_for_file_access(),
54635463
errmsg("could not read file \"%s\": %m",
5464-
ZENITH_SIGNAL_FILE)));
5464+
NEON_SIGNAL_FILE)));
54655465
content[statbuf.st_size] = '\0';
54665466

54675467
/* Parse it */
54685468
if (sscanf(content, "PREV LSN: %19s", prev_lsn_str) != 1)
54695469
ereport(ERROR,
54705470
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
5471-
errmsg("invalid data in file \"%s\"", ZENITH_SIGNAL_FILE)));
5471+
errmsg("invalid data in file \"%s\"", NEON_SIGNAL_FILE)));
54725472

54735473
if (strcmp(prev_lsn_str, "invalid") == 0)
54745474
{
54755475
/* No prev LSN. Forbid starting up in read-write mode */
5476-
zenithLastRec = InvalidXLogRecPtr;
5477-
zenithWriteOk = false;
5476+
neonLastRec = InvalidXLogRecPtr;
5477+
neonWriteOk = false;
54785478
}
54795479
else if (strcmp(prev_lsn_str, "none") == 0)
54805480
{
@@ -5483,8 +5483,8 @@ readZenithSignalFile(void)
54835483
* to start without it. This happens when you start the compute
54845484
* node for the first time on a new branch.
54855485
*/
5486-
zenithLastRec = InvalidXLogRecPtr;
5487-
zenithWriteOk = true;
5486+
neonLastRec = InvalidXLogRecPtr;
5487+
neonWriteOk = true;
54885488
}
54895489
else
54905490
{
@@ -5494,22 +5494,22 @@ readZenithSignalFile(void)
54945494
if (sscanf(prev_lsn_str, "%X/%X", &hi, &lo) != 2)
54955495
ereport(ERROR,
54965496
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
5497-
errmsg("invalid data in file \"%s\"", ZENITH_SIGNAL_FILE)));
5498-
zenithLastRec = ((uint64) hi) << 32 | lo;
5497+
errmsg("invalid data in file \"%s\"", NEON_SIGNAL_FILE)));
5498+
neonLastRec = ((uint64) hi) << 32 | lo;
54995499

55005500
/* If prev LSN is given, it better be valid */
5501-
if (zenithLastRec == InvalidXLogRecPtr)
5501+
if (neonLastRec == InvalidXLogRecPtr)
55025502
ereport(ERROR,
55035503
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
5504-
errmsg("invalid prev-LSN in file \"%s\"", ZENITH_SIGNAL_FILE)));
5505-
zenithWriteOk = true;
5504+
errmsg("invalid prev-LSN in file \"%s\"", NEON_SIGNAL_FILE)));
5505+
neonWriteOk = true;
55065506
}
5507-
ZenithRecoveryRequested = true;
5507+
NeonRecoveryRequested = true;
55085508
close(fd);
55095509

55105510
elog(LOG,
5511-
"[ZENITH] found 'zenith.signal' file. setting prev LSN to %X/%X",
5512-
LSN_FORMAT_ARGS(zenithLastRec));
5511+
"[NEON] found 'neon.signal' file. setting prev LSN to %X/%X",
5512+
LSN_FORMAT_ARGS(neonLastRec));
55135513
}
55145514
}
55155515

@@ -5545,14 +5545,14 @@ StartupXLOG(void)
55455545
CurrentResourceOwner = AuxProcessResourceOwner;
55465546

55475547
/*
5548-
* Read zenith.signal before anything else.
5548+
* Read neon.signal before anything else.
55495549
*/
5550-
readZenithSignalFile();
5550+
readNeonSignalFile();
55515551

55525552
/*
55535553
* Check that contents look valid.
55545554
*/
5555-
if (!XRecOffIsValid(ControlFile->checkPoint) && !ZenithRecoveryRequested)
5555+
if (!XRecOffIsValid(ControlFile->checkPoint) && !NeonRecoveryRequested)
55565556
ereport(FATAL,
55575557
(errcode(ERRCODE_DATA_CORRUPTED),
55585558
errmsg("control file contains invalid checkpoint location")));

src/backend/access/transam/xlogrecovery.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -762,18 +762,18 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
762762
/* tell the caller to delete it later */
763763
haveBackupLabel = true;
764764
}
765-
else if (ZenithRecoveryRequested)
765+
else if (NeonRecoveryRequested)
766766
{
767767
/*
768-
* Zenith hacks to spawn compute node without WAL. Pretend that we
769-
* just finished reading the record that started at 'zenithLastRec'
768+
* Neon hacks to spawn compute node without WAL. Pretend that we
769+
* just finished reading the record that started at 'neonLastRec'
770770
* and ended at checkpoint.redo
771771
*/
772-
elog(LOG, "starting with zenith basebackup at LSN %X/%X, prev %X/%X",
772+
elog(LOG, "starting with neon basebackup at LSN %X/%X, prev %X/%X",
773773
LSN_FORMAT_ARGS(ControlFile->checkPointCopy.redo),
774-
LSN_FORMAT_ARGS(zenithLastRec));
774+
LSN_FORMAT_ARGS(neonLastRec));
775775

776-
CheckPointLoc = zenithLastRec;
776+
CheckPointLoc = neonLastRec;
777777
CheckPointTLI = ControlFile->checkPointCopy.ThisTimeLineID;
778778
RedoStartLSN = ControlFile->checkPointCopy.redo;
779779
// FIXME needs review. rebase of ff41b709abea6a9c42100a4fcb0ff434b2c846c9
@@ -935,9 +935,9 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
935935
else if (recoveryTarget == RECOVERY_TARGET_IMMEDIATE)
936936
ereport(LOG,
937937
(errmsg("starting point-in-time recovery to earliest consistent point")));
938-
else if (ZenithRecoveryRequested)
938+
else if (NeonRecoveryRequested)
939939
ereport(LOG,
940-
(errmsg("starting zenith recovery")));
940+
(errmsg("starting neon recovery")));
941941
else
942942
ereport(LOG,
943943
(errmsg("starting archive recovery")));
@@ -1008,7 +1008,7 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
10081008
(errmsg("invalid next transaction ID")));
10091009

10101010
/* sanity check */
1011-
if (checkPoint.redo > CheckPointLoc && !ZenithRecoveryRequested)
1011+
if (checkPoint.redo > CheckPointLoc && !NeonRecoveryRequested)
10121012
ereport(PANIC,
10131013
(errmsg("invalid redo in checkpoint record")));
10141014

@@ -1635,7 +1635,7 @@ FinishWalRecovery(void)
16351635
lastRecTLI = XLogRecoveryCtl->lastReplayedTLI;
16361636
}
16371637

1638-
if (!ZenithRecoveryRequested)
1638+
if (!NeonRecoveryRequested)
16391639
{
16401640
XLogPrefetcherBeginRead(xlogprefetcher, lastRec);
16411641
(void) ReadRecord(xlogprefetcher, PANIC, false, lastRecTLI);
@@ -1675,13 +1675,13 @@ FinishWalRecovery(void)
16751675
}
16761676

16771677
/*
1678-
* When starting from a zenith base backup, we don't have WAL. Initialize
1678+
* When starting from a neon base backup, we don't have WAL. Initialize
16791679
* the WAL page where we will start writing new records from scratch,
16801680
* instead.
16811681
*/
1682-
if (ZenithRecoveryRequested)
1682+
if (NeonRecoveryRequested)
16831683
{
1684-
if (!zenithWriteOk)
1684+
if (!neonWriteOk)
16851685
{
16861686
/*
16871687
* We cannot start generating new WAL if we don't have a valid prev-LSN
@@ -1727,7 +1727,7 @@ FinishWalRecovery(void)
17271727
result->lastPage = page;
17281728
elog(LOG, "Continue writing WAL at %X/%X", LSN_FORMAT_ARGS(xlogreader->EndRecPtr));
17291729

1730-
// FIXME: should we unlink zenith.signal?
1730+
// FIXME: should we unlink neon.signal?
17311731
}
17321732
}
17331733

@@ -1787,7 +1787,7 @@ ShutdownWalRecovery(void)
17871787
char recoveryPath[MAXPGPATH];
17881788

17891789
/* Final update of pg_stat_recovery_prefetch. */
1790-
if (!ZenithRecoveryRequested)
1790+
if (!NeonRecoveryRequested)
17911791
{
17921792
XLogPrefetcherComputeStats(xlogprefetcher);
17931793
}
@@ -1800,7 +1800,7 @@ ShutdownWalRecovery(void)
18001800
}
18011801
XLogReaderFree(xlogreader);
18021802

1803-
if (!ZenithRecoveryRequested)
1803+
if (!NeonRecoveryRequested)
18041804
{
18051805
XLogPrefetcherFree(xlogprefetcher);
18061806
}
@@ -1904,7 +1904,7 @@ PerformWalRecovery(void)
19041904
else
19051905
{
19061906
/* just have to read next record after CheckPoint */
1907-
if (ZenithRecoveryRequested)
1907+
if (NeonRecoveryRequested)
19081908
xlogreader->ReadRecPtr = CheckPointLoc;
19091909
else
19101910
Assert(xlogreader->ReadRecPtr == CheckPointLoc);

src/backend/commands/sequence.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
* so we pre-log a few fetches in advance. In the event of
5656
* crash we can lose (skip over) as many values as we pre-logged.
5757
*/
58-
/* NEON XXX: to ensure sequence order of sequence in Zenith we need to WAL log each sequence update. */
58+
/* NEON XXX: to ensure sequence order of sequence in Neon we need to WAL log each sequence update. */
5959
/* #define SEQ_LOG_VALS 32 */
6060
#define SEQ_LOG_VALS 0
6161

src/backend/replication/walsender.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3540,7 +3540,7 @@ WalSndDone(WalSndSendDataCallback send_data)
35403540
* flush location if valid, write otherwise. Tools like pg_receivewal will
35413541
* usually (unless in synchronous mode) return an invalid flush location.
35423542
*/
3543-
// XXX Zenith uses flush_lsn to pass extra payload, so use write_lsn here
3543+
// XXX Neon uses flush_lsn to pass extra payload, so use write_lsn here
35443544
replicatedPtr = MyWalSnd->write;
35453545

35463546
if (WalSndCaughtUp && sentPtr == replicatedPtr &&

src/backend/storage/buffer/bufmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ int bgwriter_flush_after = DEFAULT_BGWRITER_FLUSH_AFTER;
173173
int backend_flush_after = DEFAULT_BACKEND_FLUSH_AFTER;
174174

175175
/* Evict unpinned pages (for better test coverage) */
176-
bool zenith_test_evict = false;
176+
bool neon_test_evict = false;
177177

178178

179179
/* local state for LockBufferForCleanup */
@@ -2892,7 +2892,7 @@ UnpinBufferNoOwner(BufferDesc *buf)
28922892
}
28932893
ForgetPrivateRefCountEntry(ref);
28942894

2895-
if (zenith_test_evict && !InRecovery)
2895+
if (neon_test_evict && !InRecovery)
28962896
{
28972897
buf_state = LockBufHdr(buf);
28982898
if ((buf_state & BM_VALID) && BUF_STATE_GET_REFCOUNT(buf_state) == 0)

src/backend/storage/buffer/localbuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ GetLocalVictimBuffer(void)
205205
{
206206
if (-victim_bufid - 1 == wal_redo_buffer)
207207
{
208-
/* ZENITH: Prevent eviction of the buffer with target wal redo page */
208+
/* NEON: Prevent eviction of the buffer with target wal redo page */
209209
continue;
210210
}
211211

src/backend/utils/misc/guc_tables.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2062,7 +2062,7 @@ struct config_bool ConfigureNamesBool[] =
20622062
{"neon_test_evict", PGC_POSTMASTER, UNGROUPED,
20632063
gettext_noop("Evict unpinned pages (for better test coverage)"),
20642064
},
2065-
&zenith_test_evict,
2065+
&neon_test_evict,
20662066
false,
20672067
NULL, NULL, NULL
20682068
},

src/include/access/xlog.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ extern PGDLLIMPORT XLogRecPtr XactLastCommitEnd;
4141
*/
4242
#define REL_METADATA_PSEUDO_BLOCKNO InvalidBlockNumber
4343

44-
extern bool ZenithRecoveryRequested;
45-
extern XLogRecPtr zenithLastRec;
46-
extern bool zenithWriteOk;
44+
extern bool NeonRecoveryRequested;
45+
extern XLogRecPtr neonLastRec;
46+
extern bool neonWriteOk;
4747

4848
/* these variables are GUC parameters related to XLOG */
4949
extern PGDLLIMPORT int wal_segment_size;
@@ -341,7 +341,7 @@ extern restore_running_xacts_callback_t restore_running_xacts_callback;
341341
#define TABLESPACE_MAP "tablespace_map"
342342
#define TABLESPACE_MAP_OLD "tablespace_map.old"
343343

344-
#define ZENITH_SIGNAL_FILE "zenith.signal"
344+
#define NEON_SIGNAL_FILE "neon.signal"
345345

346346
/* files to signal promotion to primary */
347347
#define PROMOTE_SIGNAL_FILE "promote"

src/include/storage/bufmgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ extern PGDLLIMPORT int checkpoint_flush_after;
173173
extern PGDLLIMPORT int backend_flush_after;
174174
extern PGDLLIMPORT int bgwriter_flush_after;
175175

176-
extern bool zenith_test_evict;
176+
extern bool neon_test_evict;
177177

178178
/* in buf_init.c */
179179
extern PGDLLIMPORT char *BufferBlocks;

0 commit comments

Comments
 (0)