Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitde531e6

Browse files
committed
PBCKP-797: fix race condition by waiting
and filling same amount of rows.
1 parent70b97d8 commitde531e6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎tests/page_test.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
importsubprocess
77
importgzip
88
importshutil
9+
importtime
910

1011
classPageTest(ProbackupTest,unittest.TestCase):
1112

@@ -893,7 +894,7 @@ def test_page_backup_with_alien_wal_segment(self):
893894
"create table t_heap as select i as id, "
894895
"md5(i::text) as text, "
895896
"md5(repeat(i::text,10))::tsvector as tsvector "
896-
"from generate_series(0,1000) i;")
897+
"from generate_series(0,10000) i;")
897898

898899
alien_node.safe_psql(
899900
"postgres",
@@ -905,7 +906,7 @@ def test_page_backup_with_alien_wal_segment(self):
905906
"create table t_heap_alien as select i as id, "
906907
"md5(i::text) as text, "
907908
"md5(repeat(i::text,10))::tsvector as tsvector "
908-
"from generate_series(0,100000) i;")
909+
"from generate_series(0,10000) i;")
909910

910911
# copy latest wal segment
911912
wals_dir=os.path.join(backup_dir,'wal','alien_node')
@@ -916,9 +917,9 @@ def test_page_backup_with_alien_wal_segment(self):
916917
file=os.path.join(wals_dir,filename)
917918
file_destination=os.path.join(
918919
os.path.join(backup_dir,'wal','node'),filename)
919-
#file =os.path.join(wals_dir, '000000010000000000000004')
920-
print(file)
921-
print(file_destination)
920+
start=time.time()
921+
whilenotos.path.exists(file_destination)andtime.time()-start<20:
922+
time.sleep(0.1)
922923
os.remove(file_destination)
923924
os.rename(file,file_destination)
924925

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp