Failed loop
According to tests, looks like mirror has failed loop. For example with serialize error. Service will try to resend failed entry on new requests.
Case, tests run in order
test_delete (test.integration.test_mongo_client.WebSocketTest) ... FAIL
test_insert_one (test.integration.test_mongo_client.WebSocketTest) ... FAIL
test_ping (test.integration.test_mongo_client.WebSocketTest) ... ok
test_replace (test.integration.test_mongo_client.WebSocketTest) ... > /mirror/test/integration/test_mongo_client.py(180)test_replace()
-> self.assertEqual(client_obj['title'], 'string')
(Pdb) c
ERROR
test_update (test.integration.test_mongo_client.WebSocketTest) ... > /mirror/test/integration/test_mongo_client.py(154)test_update()
-> self.assertEqual(document['title'], client_obj['title'])
(Pdb) c
ERROR
test_update_upsert (test.integration.test_mongo_client.WebSocketTest) ... > /mirror/test/integration/test_mongo_client.py(193)test_update_upsert()
-> self.assertEqual(client_obj['title'], 'string')
(Pdb) c
ERROR
test_update_with_none (test.integration.test_mongo_client.WebSocketTest) ... > /mirror/test/integration/test_mongo_client.py(167)test_update_with_none()
-> self.assertEqual(client_obj['title'], 'string')
(Pdb) c
ERROR
Log from mirror service:
DEBUG:asyncio:poll 3597834.092 ms took 9.224 ms: 1 events
DEBUG:asyncio:poll 3597822.065 ms took 1.100 ms: 1 events
INFO:asyncio:poll 3597819.744 ms took 1002.476 ms: 1 events
DEBUG:asyncio:poll 3596814.566 ms took 986.022 ms: 1 events
ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/mirror/mongodb_mirror/main.py", line 348, in websocket_handler
await request.app.mirror.sync_client(client)
File "/mirror/mongodb_mirror/main.py", line 231, in sync_client
await client.delete(ts, data)
File "/mirror/mongodb_mirror/main.py", line 153, in delete
'ts': ts
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_ws.py", line 294, in send_json
await self.send_str(dumps(data), compress=compress)
File "/usr/local/lib/python3.7/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/local/lib/python3.7/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python3.7/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/local/lib/python3.7/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ObjectId is not JSON serializable
DEBUG:asyncio:poll 3592724.875 ms took 1.789 ms: 1 events
DEBUG:asyncio:poll 3592721.534 ms took 0.519 ms: 1 events
DEBUG:asyncio:poll 3592719.536 ms took 1.132 ms: 1 events
ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/mirror/mongodb_mirror/main.py", line 348, in websocket_handler
await request.app.mirror.sync_client(client)
File "/mirror/mongodb_mirror/main.py", line 231, in sync_client
await client.delete(ts, data)
File "/mirror/mongodb_mirror/main.py", line 153, in delete
'ts': ts
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_ws.py", line 294, in send_json
await self.send_str(dumps(data), compress=compress)
File "/usr/local/lib/python3.7/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/local/lib/python3.7/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python3.7/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/local/lib/python3.7/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ObjectId is not JSON serializable
.......
In case we have one action on delete, in mirror-service log we have one reapeted error on delete action
Edited by Ghost User