From a8e339446af50be4c90f3d49dbd81e0593150d09 Mon Sep 17 00:00:00 2001 From: Brett Heap <1513478+brettheap@users.noreply.github.com> Date: Sun, 15 Nov 2026 15:35:17 +0000 Subject: [PATCH 001/165] 007 S007-06+13+19+20+25: The guard's direct read and phase-N cases, test 9's measurements, AT-F6's write cases, test 10, and the disaster, drill and rollback cases (19 tasks; part of opensoft/openRepoTools#165) Pull request P09 of feature 007's task sets, version 12h: lane 2's sets S007-06, S007-13, S007-19, S007-20 and S007-25 in one commit, through the code queue. Its immediate predecessor, P01, code pull request opensoft/openRepoTools-code#88, has landed as code main f3576b95a2d44913ee56c6834a1de141707ed7c6, and it lands after P02 and P03, code pull requests opensoft/openRepoTools-code#98 and opensoft/openRepoTools-code#93 (rules 2 and 3), so it is cut on code main after run 1, which takes P02's head ce6e42357dac9d7270e9f4e4a56f21585cce5fe8 and then P03's head 81483ab50d1c75b7be3c8932e00efea3d284d102 by merge commits, and it carries no Depends-On line. It is cut on code main 6aa8b5c026c6d131b44242f3b3e618b41d6ebf19, P02's and P03's landing: 7647afdfe188ec7642c502a8f1a4cb7443380530 merges P02's head into f3576b95, and 6aa8b5c0 then merges P03's head; its tree, 04baa7c9d636f6e781a0aa85987b36e67c8f4f5b, is the tree of the stand-in on which lane 1 cut this commit. It is cut from lane 1's line R at merge179 f96d3ee1318dc07808c92455796c42056b292d54, where lane 2 has said its tips are its latest (opensoft/openRepoTools#165 6896628490); the last of its commits came in at merge174 6a921d6479dd25b39203c3781df999ef6c7f64b3, G's head 0ba82447357dbf5093b0e2ceff3a0c45eb163c8e. Its 240 task commits, all lane 2's, were picked with cherry-pick -x in line R's order across the five sets; each part below lists its own, in that order. 236 picks applied with no conflict and kept their own patch-ids. Four, T229a, T229b, T229c and T229e, met lines of P01's and P02's in tests/pgcluster.py and in T200's fixture module, tests/test_sql_register_fixture.py, and are settled below, each in line R's order. Every path is in its task's files: or is a marker. No plain commit of landing note 15 falls in these sets, and no line R commit holds their code by hunk. Every line R merge that touches the ten paths, lane 2's merges inside its lines among them, is there the clean merge of its two parents on those paths, so no merge's own change is carried, and lane 2's merges are not picked. The full shas are pointers into lane 1's share. Rule 11: lane 2's gate tables for the eight modules are among the picks: T213q's for the guard module, T215m's for outage, T220n's for bounds, T226p's for measure, T224h's for managed, T253l's for landing_expired, T274e's for disaster and T276j's for drill. T237zf, below, is T237's bounds-module commit; lane 2's T237zzf, built on G after merge179, rides P29 with T124 and is in neither line R nor this commit, and lane 2's T259b, T212g, T273j and its later commits for other sets are not in it either (opensoft/openRepoTools#165 6896628490). After the 240 picks each of the ten paths equals line R's merge179 blob: tests/test_sql_register_guard.py 8fc56267b4737429c7d4db4f85ef10d69552245b, which line R has held since merge174; tests/test_sql_register_outage.py 0c742fe4459629843c1308a1c8dcd5f1d61d2cdb, since merge118; tests/test_sql_register_bounds.py 3af218c304a9781ab5f31889f226eaca375aff03, since merge126; tests/test_sql_register_measure.py 15b2824d8eeddd4b9be21641b93720e5389cf5a0, since merge114; tests/test_sql_register_managed.py 622d678f291b538ed49e5a5e8d4980d9610a1510, since merge112; tests/test_sql_register_landing_expired.py 1493f5ff2a63940efe01003e15662c4bf73b8aa6, since merge125; tests/test_sql_register_disaster.py 41370e07ea2c420a4faa0deb45197589e29f86f6, since merge121; tests/test_sql_register_drill.py bf3fa7b53c5e91050f0af42187963e2354722a4c, since merge143; and tests/pgcluster.py b72bfcdf2381fc72d92660c8a3970f06253a0903 and tests/test_sql_register_fixture.py 6ae31181d17351a71c257d766791e7c4c8e21d63, both since merge153. Each settled hunk is proven so, against those merge179 blobs. 007 S007-06: The guard's direct read, AT-F6's phase-N bind cases, the outage cases, and D9's phase-N timeouts table (T213, T214, T215, T219, T220; part of opensoft/openRepoTools#165) - T220, lane 2's, whole, in line R's merge109 604f11583c5430b4db76cf6decf23202266236fb: T220 8441316ad8ff44ca78ad7d220fdeeedd3025352d, T220b 5d6c8a5dfe7073094b3a4077bbd68651713b304c, T220c b7d38cd191b8ac0b6c28e3e4ac4f7f6a8402bda4, T220d d6c5c3adc375a5e5576dcb497a4a7be7178a27be, T220e 2f0285f43d1f247494c8d2530605cedb7efafc9a and T220f e756f582ec9cd24795c4bf9c029a686701870cea. - T214, lane 2's, whole, in line R's merge115 78291e4cd18e724b794fd4c2364f03c85887545f: T214 5c74fea123a1a644c40bc41eeba70f0e8129cd99. - T213, lane 2's, whole, in line R's merge115: T213 566c4e3859849315dff7421f2ee3dea80854900b, T213b 5daa0536c7a340a016ccbf678d61f7cd4c50d9ac and T213c 085bbae1355ea6d6160461ffee7b7da50a480dc0. - T214, lane 2's, whole, in line R's merge115: T214b a1181a414b031999705bed4fe14d73a2bf8fca69 and T214c 8dd60742346f8e0e4083498bd2836b707cfc45f7. - T213, lane 2's, whole, in line R's merge115: T213d f3c54fd8c1d5e19bedf5bd395214560e94aebe77. - T214, lane 2's, whole, in line R's merge115: T214d dee266e39651c1caf56b6b9205862b7b8cfcf4f4 and T214e d05d2053730884d50cce857f1a80e7da31fbe9ca. - T213, lane 2's, whole, in line R's merge115: T213e 3c694a2f55b02a3383ed8a21f066bb6012cffbe7, T213f b8ec678773350513bb48658892334b1c39af6d00, T213g cfe6432ff13f33fed8dfe7d7e4260ca0d04472a3, T213h 08766d634128517e4b6615857238393eecd966fa, T213i 83e151031abf0c80cfc9f97bf808959f7c2e1432, T213j c48c233cc9f703845f474ea31b8c67c68dbec586, T213k 16cd1cc4e115b94fb1808e01b97d7522eb7b5be5 and T213l e1006ec39791693cb9facae0c9912f81b74659a5. - T214, lane 2's, whole, in line R's merge115: T214f 42ccd5d77c4afa6012637375cb2a1b934bed74ed. - T213, lane 2's, whole, in line R's merge115: T213m e5be7ace62b6b9cc731488b08c4f0b05bb78e6e4 and T213n 4e0e1753eecd27b3e9ceca68906df3b52aa2ccab. - T214, lane 2's, whole, in line R's merge115: T214g 90293b0d2d1299b136c8ea836dffaab55054e5ba, T214h 681998d64d6de95ccadaca1edd1593e7b62fad69, T214i 54d2a59ba50643b94bcb272244bde6b7d6c81266, T214j 75112dad5c826f1d8f9b1f4437d6b9c55ecfc6ab, T214k 67da06831d4ba3587e440428c6de44326eaa5d84 and T214l 186897aec5c6743ecabbae6c6d808fa46aca8c2d. - T213, lane 2's, whole, in line R's merge115: T213o dc5ca0bc016fb37465a3fa54358b252c4ccade4a, T213p 4a665a72f42286db5fdce9e79d2e9bc1eb24ec19 and T213q 34bde239b6d2ab023597c2b6fb9992c9308e3bd2. - T215, lane 2's, whole, in line R's merge118 e49011de05ba08f96c5d7707b10798224bdf10be: T215 51dd636b062f02d5ee7658d98bb389851c1005a0 and T215b 093763f28c48f8f28eb1f10edeaa6866a4e9f3df. - T219, lane 2's, whole, in line R's merge118: T219 6a3423cc6445d09e3ee98afc9b461e3717926819 and T219b 8ec84fe4c0cff6cae68633babfec4007cc70d2f4. - T215, lane 2's, whole, in line R's merge118: T215c 87ed0a9b12dc687bb3b46eec18c009905f100916, T215d 3d575439d6f3dbb31dd52070a488e4e83643a91b, T215e c96ba4ab791e287e5a0731ffc0edc4c5a26751cd, T215f 6c5281b352ed3abae68c87707c5c01753e6a54f9 and T215g 25b1300a6c805ae6807585c3aa4b0bfa91e9851a. - T219, lane 2's, whole, in line R's merge118: T219c fb0dfacbfdb361170e8bdd9c2056b95c1c993878 and T219d 96f59aadf10c0e530bd1d56c774cc620b1c51e4e. - T215, lane 2's, whole, in line R's merge118: T215h b0c37300f27828ae5a7315599f45f180b8d88f15. - T219, lane 2's, whole, in line R's merge118: T219e ae040caf09e10c282f9c07d229c4ec9fbe1c85c4 and T219f bc6e00a40e43af45dd3ea400f4bde212b6b0320d. - T215, lane 2's, whole, in line R's merge118: T215i fc7ffc44df7de96c10c26f44652238090b069064 and T215j 215791c238198db32a6a3721b3c81c2988d0059c. - T219, lane 2's, whole, in line R's merge118: T219g 25d39cf2696c8ac6febb411cceac74252ed3afa7, T219h 521f14d847801a8606c15b5d28b42bb9c5aece36 and T219i 0494848da6e06e60e26cf8d1fa220a7f71a26512. - T215, lane 2's, whole, in line R's merge118: T215k 490d0f83a18f70cdbe8d7f7012b7fcb033870021, T215l 2195d92aac88c28c884b29ba31227fa12d4f1e3d and T215m 344282696f63b8505f601e3de09fb3fc5805d0e2. - T220, lane 2's, whole, in line R's merge126 d4bb21f5df03ec0a8f45f5e7ffb86c765de9224e: T220g af42bb03ac113f853d375a4f2164de3e01178604, T220h 288ed77b4d8885d0186e6fb32d16bf9d30f7593d, T220i 5890b386a1710162e1ecfc6847e4443685a7264e, T220j a5b7bb8dd022ac79963b5a5d3297ea8d5819dc3f, T220k 807226de7f6050c46cc16246e72cf03eb863bf6f, T220l 8a706a21872e69b1060217fe6739e42286bedbed, T220m 2120cd76ce1b22b328afabdfe6f6497f6f100a00 and T220n b8785b8b5f48a564a71c61576be0925ded07544d. - T214, lane 2's, whole, in line R's merge151 4052f85955ecd35de818258a69b05131d740f303: T214m cdb43aefc2fab2c150dc79039449179e250c00a1 and T214n 0ba8fdf5eff01a9381f669521bbd0dc189926d33. - T213, lane 2's, whole, in line R's merge151: T213r 36bb054628bfde40b0f595b9dfcf414c4064ba59. - T214, lane 2's, whole, in line R's merge151: T214p 3e2bea4902ce83d3758b36578dbf6751ed48e55d. - T214, lane 2's, whole, in line R's merge174 6a921d6479dd25b39203c3781df999ef6c7f64b3: T214q 41e6ec264aabaa5ba277216d3333751187f281a7, T214r 4374ed1ac9e2b6906bd64a4c00fc5833cacd43b6, T214t 0994d6c10a278203174434f08bf4cb5c4959bf3d, T214u 374de2f366ad5087762be51a5dd655866d08c7ab, T214o dff15ae18aef0fa483b4eb3188daffefb2b0ac60, T214s 54b5226d2cf6b4c4f08ac08eb307bd49a39e16d6, T214v a60ffdd3728e92adc51733dd0e979220d7c0bbb0, T214w f1c23a8ca0064135b01589ecd2e8fd92fb969b8f, T214y 44f211c9ca65f509eb05bde30c80a4e96918e045 and T214x 06bc34c391d554e65985eac4f33c3b38319bb679. - Markers: tests/sql_register_landed/T213, T214, T215, T219 and T220. 007 S007-13: Test 9's phase-N measurements, the TLS and counting clusters, and the managed-server and TLS-at-load cases (T226, T229, T224, T230; part of opensoft/openRepoTools#165) - T229, lane 2's, whole, in line R's merge108 9a2fdfeaf95b72945f5ff488bc0212f95b416230: T229a 83910630c0d8ae1dce3d801f1cd9ab7c41db11fb. Its pick meets two add/add hunks in tests/pgcluster.py, where the cut holds P02's T227b lines just where T229a adds its own: T227b's `_imported_check`, 17 lines, against T229a's `prepare`, 4, and test 7's fixture register, 265 lines with T227c's, against T229a's section 5.6 clusters, 320. Each is settled as the cut's lines, then T229a's, line R's order: in merge179's blob the cut's 17 lines are :746 to :762 and T229a's `prepare` follows at :763, and the cut's 265 are :882 to :1146 and T229a's section begins at :1147. The pick adds and removes exactly T229a's own lines, +428 -14. - T229, lane 2's, whole, in line R's merge108: T229b ba0ff65adc59d72bc748297f0b8113275668871e. Its import hunk merges with no conflict and adds only `import socket`, since the cut holds `import pytest` and its blank line (P01's T205d) and `import threading` and `import time` (P02's T228c). Its one conflict is an add/add at the module's end: T229b's 162 lines against the cut's 132, T205c's 62 (P01) and T228b's 70 (P02). It is settled as T229b's lines, then the cut's, line R's order (version 12h :37): in merge179's blob T229b's section is :260 to :422, before T205c's sweep cases, :711 to :770, and T228b's case, :783 to :850. The pick adds T229b's other 163 lines and removes none. - T229, lane 2's, whole, in line R's merge108: T229c 3e5f112820e6fdfef396161121e292465f6677f3. Its tests/pgcluster.py hunk merges with no conflict. In the fixture module its 165 lines meet the cut's 132 in one add/add after T229b's lines, settled as T229c's lines, then the cut's, line R's order: in merge179's blob T229c's section is :425 to :587, before T205c's at :711. The pick adds exactly T229c's own lines in both files, +165 and +162. - T229, lane 2's, whole, in line R's merge108: T229d 74d6c7ca916f43a21ed958569e5694bb9c85518f. - T224, lane 2's, whole, in line R's merge112 2e94ce32e2edf8064d889c990d4c56ea6afb6cfb: T224 259d53da2941aefdf18139926e1c5c3891ea2f88. - T230, lane 2's, whole, in line R's merge112: T230 9337e359f9e07859b6901157c0c5613ed16220fb. - T224, lane 2's, whole, in line R's merge112: T224b a8d0ca9c47870e7a82d9aa30e3179aa3d10378d1, T224c 2c3fd50a8bc41873485b306888878b189d06ee19, T224d eb7f0c99070a75fe54d3f4d486d1cdce54221af1, T224e 4fa5b16fdeec84fb8b2713aad29ecec62503d21c, T224f b4cde3095ec6f14cb29e2bc442064434529bbaeb and T224g e89ad60fd9259bcc5a2e0ca2e19daa6ee1e6870a. - T230, lane 2's, whole, in line R's merge112: T230b 533e8030e82a69d6636609776d6cd8ceca846537. - T224, lane 2's, whole, in line R's merge112: T224h 37085586b31fa843b173dca529e1d5f88ab234b5. - T226, lane 2's, whole, in line R's merge114 bc9b2776d6b149f4c302314d75c50fb2a84e983b: T226m bcc5eb6d64bbcded7fd2fc081a597341be1127e9, T226n a9f06dbaca9ec46ce09e75648d14625722f08c32, T226o 0a6a0c2128dc3f000736b2ee0a00e458246edfa1 and T226p 171af4666bb0be0eaa3df42bd027fb63d22a0f27. - T226, lane 2's, whole, in line R's merge115: T226g e46797dee666e1d7d073b114adfce1cd1d01e6dd. - T229, lane 2's, whole, in line R's merge139 618b8accc6bb9c08b2cf0feef8b38ca651be457b: T229e 35a88873dd6077092ee8481be962a752e8e69ada. Its pick meets one add/add after T205c's sweep cases: T229e's case, 10 lines, against P02's T228b case, 70. It is settled as T229e's lines, then the cut's, line R's order: in merge179's blob T229e's case is :773 to :780, before T228b's, :783 to :850. The pick adds and removes exactly T229e's own lines, +17 -4. - T229, lane 2's, whole, in line R's merge153 68b581cdb14c2cd8d79e6c5508243bd1b1586a34: T229f 712ce3d9d72e6a6e1f661e504f01e94b595543c2. - Markers: tests/sql_register_landed/T226, T229, T224 and T230. 007 S007-19: AT-F13's verb cases and test 9's phase-W measurements (T253, T255; part of opensoft/openRepoTools#165) - T255, lane 2's, whole, in line R's merge114: T255 30bc81f43c5e020ff2bff9d60a42ee8baa4e53cf, T255b cde17b2cd11bab1b3758a4ad5588833582ab4d02, T255c 0d434331c5bbfd8160c26b96bd9937da871cfa31, T255d af4300dae13398b69cb72b6f7563217cc74aa2cc, T255e 31238437a4a2de0390337eec13708be1c453b032, T255f 68c0f4b446b6e49ba008d96fff129623523911c7, T255g 16a0d5be22d568a281f1606ca3629ce965319d1f and T255h 74b71aec796e49ec08577e0b313d35ce6b21032f. - T253, lane 2's, whole, in line R's merge125 ebd83410034128a57825009a200157209c560fce: T253 e5665b7767f9dad6864e94eb53d96873fde28474, T253b 23f64fcee27c43e287b51324215004a40e29d822, T253c bdf38d4671b59de7b5228cd36e6bc7dbfc41d250, T253d eb693b1527d503769c200cd8f0092c88fe4fb4ca, T253e e9b949e827b85bc97e6c5838e58ecba417b1b4ad, T253f f789502400335feb2d227f8f38b68d40ce12fe88, T253g e012804df8042d1b6e18339e9f7d42aca9021db8, T253h 9f125840c8f9eda6f92dc8a8f77fcb5a48255b2b, T253i 611084a7ff1cfe0cca7122ac27ae116818b034ee, T253j e1a2d5843f2b063f39c242d2116d999a63619330, T253k c4c23034fed455178ce10af0df9670455dde8ebb and T253l d6b7a3e276643b53283a17fbb9afde9b03d0cca0. - Markers: tests/sql_register_landed/T253 and T255. 007 S007-20: AT-F6's write cases, D9's writer rows and AT-D9c, AT-LRMPG's phase-W cases, and test 10 through the service (T254, T257, T258, T237; part of opensoft/openRepoTools#165) - T237, lane 2's, whole, in line R's merge109: T237w 835925994c1745ce7cfbaf60f106ef5b61f87154. - T257, lane 2's, whole, in line R's merge109: T257a 060fa29a32a9b6b7cfbe9baec2eb94753285aba6. - T237, lane 2's, whole, in line R's merge109: T237x 9b206da12196ab868b9969cadc867f442b7d5f40. - T257, lane 2's, whole, in line R's merge109: T257b ec0decfd2eba9f431b9e93088de0f5e1a4bcf034 and T257c 1ac4c0299dcc7c53e1c7021c48342348e8f18e21. - T237, lane 2's, whole, in line R's merge109: T237y 48a6d6616afb47347471ee8070e8dca54f4295e2. - T257, lane 2's, whole, in line R's merge109: T257d 0e608c6cce1e5e16cf66df7f78f90cb79d88685e and T257e 4bfef75c2ff8a15a82fe8b90bb0d29dc28f1d04d. - T258, lane 2's, whole, in line R's merge112: T258 a1521458734bc7307286ffa7f0723abbda8a6e01, T258b d601262f340eae55d63a5df502be9153cab52f0c and T258c 9d50572e97ee8e9d1f1718a4a471ca54789cf8c6. - T254, lane 2's, whole, in line R's merge114: T254m eaae2fa83c78b2d31f72f427f187e708d92a8a7d. - T237, lane 2's, whole, in line R's merge114: T237m 1500c1e2cef0040591c71479b61ef0a814c654fa. - T254, lane 2's, whole, in line R's merge114: T254n aebf0303be251fc2342fcd35c61e227e82f128ea and T254o 255b830c04ddf1a5875f175da21f8979479a3bb0. - T237, lane 2's, whole, in line R's merge114: T237ze d0aface1d08825a00dac78b4150286adc0e928ed, T237zh df31d99f290c5efc6f2c17b94433d672cdd1bab1, T237zp e07105881869a7e0a41c904bb66622ccd3a2c851 and T237zq 46278bf6acb356d9799bd3062f22415533e1c812. - T254, lane 2's, whole, in line R's merge114: T254zv 431fb2b82e15184c31f74237c8af1d8fed3488e8. - T254, lane 2's, whole, in line R's merge115: T254 d1d397da0d3a2d884270a38daaa4820b5741d7f3. - T237, lane 2's, whole, in line R's merge115: T237 7a997b35cd7469f825dbce9497275bd6dc077d55, T237b 9629da9be6465a4d14289f005dce985a8a618f18, T237c 8c8c844868fd7d9940a8c1476a5372b5a98bd29e, T237z d2433fbc455f8933deb8f9fe6696baf457aa3fe2, T237za e05f2fd11b8084f2b9c84845c972cb3dcd8ad0af, T237zb 43cb563cb27af8156c707797dc6d6b95c3235d5f, T237zc 54c6d5ab924687c94b09407de097bce2ad900a7b, T237zd 314bbdc47a868061978de2bee16045a86af7b6a4 and T237zg 3991cc01e1f8d96cac7885d5a58d660d96824a05. - T254, lane 2's, whole, in line R's merge115: T254p 00761f6a5afdeed76ad202f621f612825cc8ebf3, T254q 8eaef893c608e2185cc19c41f4d89076bb6fdac7 and T254r 278d2588f1705913ecf2a20165b09b03aadc1f5c. - T237, lane 2's, whole, in line R's merge115: T237zi b31e8bef043b5fbaee61ed0b538bcc7e445cbeaf. - T254, lane 2's, whole, in line R's merge115: T254s 9f3835907c121fbde013e56867b7bf6b297faaef. - T237, lane 2's, whole, in line R's merge115: T237zj b7f05852cae360b39d80313792d368f752dddf05, T237zk 72579a65a1b8e47d13a1d7ab145d1e6ab13311dd and T237zl 7e50fb8de47278d6ed18eefbdd9a51ac5c88087b. - T254, lane 2's, whole, in line R's merge115: T254t 4a0e47985929333d063a187b024d82c384910880, T254u 02ae849403e9f182a7ca8a7d62639d05ecd3dee5, T254v ec1057632494d30a3f36324f100780e2357943ef, T254w 53983d02e1ef36bd462b51ba9e97e137a446c791, T254x b629b08fb7c01247cce50387a8720b54e63ab968, T254y c4ec1ff94522387b7a407c34450b46c443b80552, T254z afad92147d15af8db88dc74e6de97f75f59461d5, T254za 2b948b82bd02d7715188135112ddf8915bb11336, T254zb 5140d93ad8371e52456e20c558e828c6f3d34f5b, T254zc c8c7109e240c03a4a2e62ed629ba0db7ea599775, T254zd 638d47c7641725051eee14ac33233726935b53e7, T254ze 7599f73711e9decbf58207b4a8990a440ca99c63, T254zf d9d4c2c65d0b3f1ce0b94d0710a676bb2059265d and T254zg 15bb2dfc1a1b8369615d0bcbf1ff6c1259e66387. - T237, lane 2's, whole, in line R's merge115: T237zm fdc576ca272323bdd2a5b2dd59a22f47b6c1bef3, T237zn 75835b3299340083bf9d2d4b7315b03a352618d4 and T237zo 8fef6b17124113013abfdfe12b3e6a6e55b451ad. - T254, lane 2's, whole, in line R's merge115: T254zh f069ebd9c8b8626c158361ae72fe2e6ee96e780a, T254zi f7c2d1514c98fce5bd48a5a73e0963debfc3483c, T254zj afc5b2b4c2e04c0ef260226c329ab1e00504a92e, T254zk 195bc7f8f6112882bb317b016e5346c4ea03bccc, T254zl 36df5af1015debddc0433cf9549140da00e02a62, T254zm e9ebda750b1dd3bbec3143084b7c1eeafb6540cf, T254zn cc4249106c7d1fe75dab0283838481ec9364d83c, T254zo 3707351a2e76fefc1210e3c0c2f589b32b940e50, T254zp 7e0549b305f96ad7af35a4d9d2e285257eb62627, T254zq 3c975e6aef64d4fcdc75fa275dce41badec293fe, T254zr 0f7b437db2a3382ba5d21f95eb0db0297de25f18, T254zs 6720e7926a3fde66023cc94d38d0f212614e45c5 and T254zt 96f31673e1d03235f2aff8bb1a587cee9fd999b4. - T237, lane 2's, whole, in line R's merge115: T237zr a51de4b5acc6f60ddf2f292011ea943e3079ac91, T237zs d7985d1981b91d7ef23880ec675a2bb71c7eff10, T237zt 221680bee0b2346a71bb702827bac174d11f88ce and T237zu 0a77daa25042a3b7b7585d3e95a1415899b86fa9. - T254, lane 2's, whole, in line R's merge115: T254zu cd8523876cbd42d60d9553d872dfc045ccab0965. - T237, lane 2's, whole, in line R's merge115: T237zv b0777ca1682b9863021c39a6375bbd384f2d29ab, T237zw 3805a4eee4a72b7cb17c90f7c7710fd75321a9af, T237zx 5d28da10014fe5827da0d9ad18141a8cd8125346 and T237zy f7f2c61adc7f709900fe12dd787465c1bb452b7f. - T257, lane 2's, whole, in line R's merge126: T257f 11f04c1eadb4d0970ce9489911163e599bdaec0d, T257g 905988b205659368bfdf0bad6606d0ed5d5dfc72, T257h 4733ad12acb8c7b32571584e97bc717c15bd393a, T257i a8d0d9301b479043a577f4a85be7580454f61ae0, T257j d42d852f680685b936f5c57f2901ff682e306b8f and T257k 87f1f5563f0e6657b2e64e9baa0846b65544b65d. - T237, lane 2's, whole, in line R's merge126: T237zf ae85f1e2e1b1605a19d8b377608a9c5bee2c654c. - T257, lane 2's, whole, in line R's merge126: T257l 30baea6cee0d3bc040afcc223b6f2254017247ed, T257m 7640947ce98ae8a5d7a332fe678fc48eaec9825d and T257n c436998188c28713ea8d4b2f60e533121b6e336f. - T237, lane 2's, whole, in line R's merge142 b3185ba6cb57d2ae79e98eec59c3c70fa3d88b71: T237zz 9cc87db1aa5b3a5eda04c18a8157e873a2cf80f2. - T237, lane 2's, whole, in line R's merge151: T237zza f61ddedc67008374b73ffb34c5429462979819b1, T237zzb 5fc5b9edffefdce8a868d3d70fb371549d725104 and T237zzc af51f937446a1ff329b8f060f316a5859d1bffbe. - T254, lane 2's, whole, in line R's merge174: T254zw 56a691b1fd21d87769ff1ec12b63a97caccf459c. - T237, lane 2's, whole, in line R's merge174: T237zzd 655a5dc3de27eeda77abc86f80eb5d5eac2b2fa1, T237zze 63dbfb93c81b8a28cad1fdb762da500671e7ace8 and T237zzg 0ba82447357dbf5093b0e2ceff3a0c45eb163c8e. - Markers: tests/sql_register_landed/T254, T257, T258 and T237. 007 S007-25: D22/AT-F18, test 13's drill, D9's rollback rows and the rollback's outage cases (T274, T276, T278, T279; part of opensoft/openRepoTools#165) - T279, lane 2's, whole, in line R's merge118: T279 0a4f90847d6f851bdde7e5ad28589ff4d05f8f08. - T276, lane 2's, whole, in line R's merge120 639601ca4b939c2c68227f644d5aa47d51e4254d: T276 29affe13c4627b5c98a53c54dcf16ef9687e12d4, T276b ca9b1a3a0cc4bf704c50e48c59d5a0f5f469ef54, T276c bd52de3e437991c6ebc7b00975ebcf5e6f57b02d, T276d 9e4e93f1647837e0c69f26af50e7124ec3047597, T276e 6c51b211548e43358fde13c88d0417a7da970687, T276f 2a7b0f1b395c0875d73fecf51e83aa6c1758f7c2, T276g b8e1cee9b9849076bdb0617474bcfc4c048441d3, T276h 4044c2b51ea5f2b1aee2bc50a2f673b5ec7602c9, T276i acb12a2440fb7168e73efaef15c9ee7813eb7edf and T276j 1320583f4c16719788baa0fdf55956d3dd525d05. - T274, lane 2's, whole, in line R's merge121 353b10d5a36f7d6b8ff85b77b353c4eb86eacd90: T274 b710057d5f68a0f918b271fdab6126bb76d57a00, T274b 291589db5768af3702aa35a44b2a0ad544bcad83, T274c 98aaf02a993369e395fc4500cf6f83c0b1a31c7f, T274d 239704564150ecafb389d484342929b6b45d9755 and T274e 2112cfeb4633e7e33f8013388f8cb08518d9cd42. - T279, lane 2's, whole, in line R's merge125: T279b f6df207720955c8e381444130bbc61b120a76f31. - T278, lane 2's, whole, in line R's merge126: T278 fe6f190fcea93c92cb44276312b53ec2bec687c3, T278b 205ff81f2c4552509b5c627f90ac05c9cfccab47, T278c 24e8261c48c6ee830cf636d893f1c86b081b4166, T278d 80a645d622e00e447d96effb26c2f8b7c9b7c193, T278e efffc0f6949877e982513adeabc18a0e727fd995, T278f f8ec5a6bb3859b2ee00c5db12e4eef83f74b1087 and T278g e9e9c9d9e2852c305ebd28fd77277b9118bbb21b. - T276, lane 2's, whole, in line R's merge143 448d5f159ef17b8eaeb69de11f2a0bd54b923140: T276k 87e3336b897e9e9d0f7b241bf0fcb503eea592af. - Markers: tests/sql_register_landed/T274, T276, T278 and T279. Lane: openRepoTools-1 Co-Authored-By: Claude Opus 5.5 --- tests/pgcluster.py | 676 +- tests/sql_register_landed/T213 | 0 tests/sql_register_landed/T214 | 0 tests/sql_register_landed/T215 | 0 tests/sql_register_landed/T219 | 0 tests/sql_register_landed/T220 | 0 tests/sql_register_landed/T224 | 0 tests/sql_register_landed/T226 | 0 tests/sql_register_landed/T229 | 0 tests/sql_register_landed/T230 | 0 tests/sql_register_landed/T237 | 0 tests/sql_register_landed/T253 | 0 tests/sql_register_landed/T254 | 0 tests/sql_register_landed/T255 | 0 tests/sql_register_landed/T257 | 0 tests/sql_register_landed/T258 | 0 tests/sql_register_landed/T274 | 0 tests/sql_register_landed/T276 | 0 tests/sql_register_landed/T278 | 0 tests/sql_register_landed/T279 | 0 tests/test_sql_register_bounds.py | 3609 +++++++++ tests/test_sql_register_disaster.py | 1599 ++++ tests/test_sql_register_drill.py | 1409 ++++ tests/test_sql_register_fixture.py | 462 ++ tests/test_sql_register_guard.py | 7957 ++++++++++++++++++++ tests/test_sql_register_landing_expired.py | 1841 +++++ tests/test_sql_register_managed.py | 1968 +++++ tests/test_sql_register_measure.py | 1775 +++++ tests/test_sql_register_outage.py | 2237 ++++++ 29 files changed, 23516 insertions(+), 17 deletions(-) create mode 100644 tests/sql_register_landed/T213 create mode 100644 tests/sql_register_landed/T214 create mode 100644 tests/sql_register_landed/T215 create mode 100644 tests/sql_register_landed/T219 create mode 100644 tests/sql_register_landed/T220 create mode 100644 tests/sql_register_landed/T224 create mode 100644 tests/sql_register_landed/T226 create mode 100644 tests/sql_register_landed/T229 create mode 100644 tests/sql_register_landed/T230 create mode 100644 tests/sql_register_landed/T237 create mode 100644 tests/sql_register_landed/T253 create mode 100644 tests/sql_register_landed/T254 create mode 100644 tests/sql_register_landed/T255 create mode 100644 tests/sql_register_landed/T257 create mode 100644 tests/sql_register_landed/T258 create mode 100644 tests/sql_register_landed/T274 create mode 100644 tests/sql_register_landed/T276 create mode 100644 tests/sql_register_landed/T278 create mode 100644 tests/sql_register_landed/T279 create mode 100644 tests/test_sql_register_bounds.py create mode 100644 tests/test_sql_register_disaster.py create mode 100644 tests/test_sql_register_drill.py create mode 100644 tests/test_sql_register_guard.py create mode 100644 tests/test_sql_register_landing_expired.py create mode 100644 tests/test_sql_register_managed.py create mode 100644 tests/test_sql_register_measure.py create mode 100644 tests/test_sql_register_outage.py diff --git a/tests/pgcluster.py b/tests/pgcluster.py index 97871b78..b72bfcdf 100644 --- a/tests/pgcluster.py +++ b/tests/pgcluster.py @@ -35,7 +35,9 @@ * `stoppable_cluster`, a cluster of the test's own, built like the session's, for the tests that stop the database: `stop()` is a fast shutdown, SIGINT and a wait, and `start_again()` starts it on the same - data and socket directories. + data and socket directories; `start_again(standby=True)` starts it in + recovery, with `standby.signal`, and fails unless `pg_is_in_recovery()` + is true, and the next plain start removes the file (T229d). THE TEMPLATES (T227; the test plan's section 3.1, "The templates"). `tmpl` is built on each cluster by P8's bootstrap, `lanes-index bootstrap --no-passwords` @@ -94,13 +96,17 @@ from __future__ import annotations import os +import queue import re +import select import shutil import signal +import socket import stat import subprocess import sys import tempfile +import threading import time from pathlib import Path from typing import Dict, List, Optional, Tuple @@ -430,9 +436,10 @@ def _tail(proc: subprocess.CompletedProcess, size: int = 800) -> str: return said[-size:] or "" -def _client_env(host: Path, user: str, dbname: str, appname: str, bindir: Path) -> dict: +def _client_env(host: Path, user: str, dbname: str, appname: str, bindir: Path, + port: int = PORT) -> dict: env = _without_pg() - env.update(PGHOST=str(host), PGPORT=str(PORT), PGUSER=user, PGDATABASE=dbname, + env.update(PGHOST=str(host), PGPORT=str(port), PGUSER=user, PGDATABASE=dbname, PGAPPNAME=appname, PGCONNECT_TIMEOUT="10", LC_ALL="C", PATH=_engine_first(bindir, env.get("PATH", os.defpath))) return env @@ -459,6 +466,9 @@ def __init__(self, bindir: Path, template_sql="", imported: bool = False) -> Non for an empty `tmpl` (the smokes' default). `imported` builds `tmpl_imported` too.""" self.bindir, self.template_sql, self.imported = bindir, template_sql, imported + #: The port (T229): it names the socket file, and a TLS cluster's TCP + #: listener uses it too. `listen` and `settings` are `prepare()`'s. + self.port, self.listen, self.settings = PORT, "", [] self.root: Optional[Path] = None self.proc: Optional[subprocess.Popen] = None self.count, self.timings = 0, {} @@ -489,7 +499,7 @@ def psql(self, sql: str, dbname: str = "postgres", user: str = SUPERUSER, argv += ["-v", f"{name}={value}"] proc = subprocess.run([*argv, "-f", "-"], input=sql, capture_output=True, text=True, timeout=120, env=_client_env(self.root, user, dbname, appname, - self.bindir), + self.bindir, self.port), check=False) if check and proc.returncode != 0: raise ClusterError(f"psql as {user} on {dbname} exited {proc.returncode}: {proc.stderr.strip()}") @@ -515,7 +525,7 @@ def start(self) -> None: _SWEPT.extend(sweep_stale()) self.root = Path(tempfile.mkdtemp(prefix=PREFIX, dir=SOCKET_PARENT)) # mode 0700 (self.root / "owner").write_text(f"{os.getpid()} {_ticks(os.getpid())}\n") - sock = self.root / f".s.PGSQL.{PORT}" + sock = self.root / f".s.PGSQL.{self.port}" if len(os.fsencode(str(sock))) > SOCKET_MAX: raise ClusterError(f"the socket path {sock} is over {SOCKET_MAX} bytes") t1 = time.monotonic() @@ -526,6 +536,7 @@ def start(self) -> None: if init.returncode != 0: raise ClusterError(f"initdb exited {init.returncode}: {init.stderr.strip()}") t2 = time.monotonic() + self.prepare() self.launch() t3 = time.monotonic() self.build_template() @@ -570,7 +581,7 @@ def admin_service(self, database: str) -> str: name, path = f"fx_{database}", home / ".pg_service.conf" text = path.read_text(encoding="utf-8") if path.exists() else "" if f"[{name}]\n" not in text: - text += (f"[{name}]\nhost={self.root}\nport={PORT}\nuser={SUPERUSER}\n" + text += (f"[{name}]\nhost={self.root}\nport={self.port}\nuser={SUPERUSER}\n" f"dbname={database}\n\n") path.write_text(text, encoding="utf-8") path.chmod(0o600) @@ -749,11 +760,15 @@ def _imported_check(self, commit: str) -> Optional[str]: f"{said!r} (journal|head|switch), not {wanted!r}") return None + def prepare(self) -> None: + """Between `initdb` and the first start: nothing here; T229's TLS and + counting clusters set their files and settings.""" + def launch(self) -> None: """`postgres` by `Popen` on this cluster's directories, and wait until it is ready.""" - argv = [self.tool("postgres"), "-D", str(self.root / "data"), "-p", str(PORT), - "-c", "listen_addresses=", "-c", f"unix_socket_directories={self.root}"] - for setting in FAST: + argv = [self.tool("postgres"), "-D", str(self.root / "data"), "-p", str(self.port), + "-c", f"listen_addresses={self.listen}", "-c", f"unix_socket_directories={self.root}"] + for setting in [*FAST, *self.settings]: argv += ["-c", setting] with open(self.root / "server.log", "ab") as log: self.proc = subprocess.Popen(argv, stdin=DEVNULL, stdout=log, stderr=subprocess.STDOUT, @@ -777,11 +792,32 @@ def stop(self) -> None: raise ClusterError(f"postgres did not stop in {DEADLINE:.0f} s after SIGINT: " f"{self.log_tail()}") from None - def start_again(self) -> None: - """Start the stopped cluster on the same data and socket directories.""" + def start_again(self, standby: bool = False) -> None: + """Start the stopped cluster on the same data and socket directories. + With `standby` (T229d; TP:5382-5387, check 11's restart in recovery; + lane 3's batch 11 (1), which corrects batch 7's ruling 2), it starts + in recovery: `standby.signal` is written in the data directory, the + start polls `postmaster.pid` for `ready`, as every start does, and + then fails unless `pg_is_in_recovery()` is true. A hot standby writes + `ready`, never `standby`: PostgreSQL 16 writes `standby` only with + `hot_standby` off, where no session connects, and a plain start + writes `ready` too, so only the query proves the recovery. A start + without it removes the file first, so the cluster comes back a + primary. T224 only calls it.""" if self.proc is not None and self.proc.poll() is None: raise ClusterError("the cluster is running, so it cannot be started again") + signal_file = self.root / "data" / "standby.signal" + if standby: + signal_file.write_text("", encoding="utf-8") + elif signal_file.exists(): + signal_file.unlink() self.launch() + if standby: + answer = self.psql("SELECT pg_is_in_recovery();", check=False) + if answer.returncode != 0 or answer.stdout.strip() != "t": + said = answer.stdout.strip() or answer.stderr.strip() or "nothing" + raise ClusterError(f"the start with standby.signal is ready but not in recovery: " + f"pg_is_in_recovery() answered {said!r}: {self.log_tail()}") def new_database(self, template: str = TEMPLATE) -> str: """`CREATE DATABASE t_ TEMPLATE