You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/08/24 08:43:19 UTC
[GitHub] [shardingsphere] sandynz opened a new pull request #11981: Fix Issue#11977 : Scaling increment task of PostgreSQL WalEventConverter ignore correct RowEvent
sandynz opened a new pull request #11981:
URL: https://github.com/apache/shardingsphere/pull/11981
Fixes #11977.
Changes proposed in this pull request:
- Do not filter schemaName, since database is defined in pg_replication_slots
- Dump debug log
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] codecov-commenter commented on pull request #11981: Fix Issue#11977 : Scaling increment task of PostgreSQL WalEventConverter ignore correct RowEvent
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #11981:
URL: https://github.com/apache/shardingsphere/pull/11981#issuecomment-904637093
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11981?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#11981](https://codecov.io/gh/apache/shardingsphere/pull/11981?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0b00b30) into [master](https://codecov.io/gh/apache/shardingsphere/commit/ed71fb20f3fce018a38da050a9a6f68b9df16229?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ed71fb2) will **increase** coverage by `0.00%`.
> The diff coverage is `80.00%`.
[](https://codecov.io/gh/apache/shardingsphere/pull/11981?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #11981 +/- ##
=========================================
Coverage 63.13% 63.13%
+ Complexity 1235 1227 -8
=========================================
Files 2293 2294 +1
Lines 34869 34884 +15
Branches 6063 6068 +5
=========================================
+ Hits 22015 22025 +10
- Misses 11074 11079 +5
Partials 1780 1780
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/11981?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...uthority/listener/PrivilegeNodeChangedWatcher.java](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvbnRleHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29udGV4dC9hdXRob3JpdHkvbGlzdGVuZXIvUHJpdmlsZWdlTm9kZUNoYW5nZWRXYXRjaGVyLmphdmE=) | `50.00% <ø> (ø)` | |
| [...rnance/core/lock/ShardingSphereDistributeLock.java](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9sb2NrL1NoYXJkaW5nU3BoZXJlRGlzdHJpYnV0ZUxvY2suamF2YQ==) | `32.00% <ø> (ø)` | |
| [...ernance/core/lock/service/LockRegistryService.java](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9sb2NrL3NlcnZpY2UvTG9ja1JlZ2lzdHJ5U2VydmljZS5qYXZh) | `37.14% <ø> (ø)` | |
| [...vernance/core/lock/watcher/LockChangedWatcher.java](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9sb2NrL3dhdGNoZXIvTG9ja0NoYW5nZWRXYXRjaGVyLmphdmE=) | `22.22% <ø> (ø)` | |
| [...core/registry/ClusterPersistRepositoryFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9yZWdpc3RyeS9DbHVzdGVyUGVyc2lzdFJlcG9zaXRvcnlGYWN0b3J5LmphdmE=) | `100.00% <ø> (ø)` | |
| [...rnance/core/registry/GovernanceWatcherFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9yZWdpc3RyeS9Hb3Zlcm5hbmNlV2F0Y2hlckZhY3RvcnkuamF2YQ==) | `0.00% <ø> (ø)` | |
| [...ance/core/registry/cache/RegistryCacheManager.java](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9yZWdpc3RyeS9jYWNoZS9SZWdpc3RyeUNhY2hlTWFuYWdlci5qYXZh) | `0.00% <ø> (ø)` | |
| [...ry/cache/subscriber/ScalingRegistrySubscriber.java](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9yZWdpc3RyeS9jYWNoZS9zdWJzY3JpYmVyL1NjYWxpbmdSZWdpc3RyeVN1YnNjcmliZXIuamF2YQ==) | `35.29% <ø> (ø)` | |
| [...onfig/subscriber/GlobalRuleRegistrySubscriber.java](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9yZWdpc3RyeS9jb25maWcvc3Vic2NyaWJlci9HbG9iYWxSdWxlUmVnaXN0cnlTdWJzY3JpYmVyLmphdmE=) | `0.00% <ø> (ø)` | |
| [...istry/config/watcher/GlobalRuleChangedWatcher.java](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS9yZWdpc3RyeS9jb25maWcvd2F0Y2hlci9HbG9iYWxSdWxlQ2hhbmdlZFdhdGNoZXIuamF2YQ==) | `57.14% <ø> (ø)` | |
| ... and [72 more](https://codecov.io/gh/apache/shardingsphere/pull/11981/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11981?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/11981?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b9e6ba9...0b00b30](https://codecov.io/gh/apache/shardingsphere/pull/11981?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] sandynz commented on pull request #11981: Fix Issue#11977 : Scaling increment task of PostgreSQL WalEventConverter ignore correct RowEvent
Posted by GitBox <gi...@apache.org>.
sandynz commented on pull request #11981:
URL: https://github.com/apache/shardingsphere/pull/11981#issuecomment-904452109
1, `slot_name` is unique globally. Verification:
`sharding_scaling` slot on `scaling1` already exists, create another `sharding_scaling` on `scaling21` failed.
```
scaling21=# SELECT * FROM pg_replication_slots;
slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size
------------------+---------------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------+------------+---------------
sharding_scaling | test_decoding | logical | 16387 | scaling1 | f | f | | | 511 | 0/1687DD0 | 0/1687E08 | reserved |
(1 row)
scaling21=# SELECT * FROM pg_create_logical_replication_slot('sharding_scaling', 'test_decoding');
ERROR: replication slot "sharding_scaling" already exists
```
2, When creating `PGReplicationStream` in `LogicalReplication`, `slotName` is defined:
```
public PGReplicationStream createReplicationStream(final Connection pgConnection, final String slotName, final LogSequenceNumber startPosition) throws SQLException {
return pgConnection.unwrap(PGConnection.class).getReplicationAPI()
.replicationStream()
.logical()
.withStartPosition(startPosition)
.withSlotName(slotName)
.withSlotOption("include-xids", true)
.withSlotOption("skip-empty-xacts", true)
.start();
}
```
3, On real test, DB operation on `scaling21` won't be notified to `scaling1` slot.
4, It's not necessary to filter schemaName.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] sandynz commented on pull request #11981: Fix Issue#11977 : Scaling increment task of PostgreSQL WalEventConverter ignore correct RowEvent
Posted by GitBox <gi...@apache.org>.
sandynz commented on pull request #11981:
URL: https://github.com/apache/shardingsphere/pull/11981#issuecomment-904454408
Execute sqls on `scaling1` one by one:
```
delete from t_order_0 where order_id in (7);
insert into t_order_0 (order_id, user_id, status) values (7,8,'ok');
```
Scaling increment task logs:
```
[DEBUG] 2021-08-24 16:36:55.345 [ShardingSphere-Scaling-execute-0] o.a.s.s.p.c.PostgreSQLWalDumper - dump, event=DeleteRowEvent(super=AbstractRowEvent(super=AbstractWalEvent(logSequenceNumber=LSN{0/168B798}), schemaName=public, tableName=t_order_0), primaryKeys=[7]), record=DataRecord(columns=[order_id=7], primaryKeyValue=[7], oldPrimaryKeyValues=[null], type=DELETE, tableName=t_order)
[DEBUG] 2021-08-24 16:36:57.847 [ShardingSphere-Scaling-execute-2] o.a.s.s.c.e.i.AbstractImporter - flush, buffer=[DataRecord(columns=[order_id=7], primaryKeyValue=[7], oldPrimaryKeyValues=[null], type=DELETE, tableName=t_order)], groupedDataRecords=[GroupedDataRecord(tableName=t_order, insertDataRecords=null, updateDataRecords=null, deleteDataRecords=[DataRecord(columns=[order_id=7], primaryKeyValue=[7], oldPrimaryKeyValues=[null], type=DELETE, tableName=t_order)])]
[DEBUG] 2021-08-24 16:36:57.847 [ShardingSphere-Scaling-execute-2] o.a.s.s.c.e.i.AbstractImporter - doFlush, buffer=[DataRecord(columns=[order_id=7], primaryKeyValue=[7], oldPrimaryKeyValues=[null], type=DELETE, tableName=t_order)]
[DEBUG] 2021-08-24 16:37:26.683 [ShardingSphere-Scaling-execute-0] o.a.s.s.p.c.PostgreSQLWalDumper - dump, event=WriteRowEvent(super=AbstractRowEvent(super=AbstractWalEvent(logSequenceNumber=LSN{0/168BD10}), schemaName=public, tableName=t_order_0), afterRow=[7, 8, ok]), record=DataRecord(columns=[order_id=7, user_id=8, status=ok], primaryKeyValue=[7], oldPrimaryKeyValues=[null], type=INSERT, tableName=t_order)
[DEBUG] 2021-08-24 16:37:28.752 [ShardingSphere-Scaling-execute-2] o.a.s.s.c.e.i.AbstractImporter - flush, buffer=[DataRecord(columns=[order_id=7, user_id=8, status=ok], primaryKeyValue=[7], oldPrimaryKeyValues=[null], type=INSERT, tableName=t_order)], groupedDataRecords=[GroupedDataRecord(tableName=t_order, insertDataRecords=[DataRecord(columns=[order_id=7, user_id=8, status=ok], primaryKeyValue=[7], oldPrimaryKeyValues=[null], type=INSERT, tableName=t_order)], updateDataRecords=null, deleteDataRecords=null)]
[DEBUG] 2021-08-24 16:37:28.753 [ShardingSphere-Scaling-execute-2] o.a.s.s.c.e.i.AbstractImporter - doFlush, buffer=[DataRecord(columns=[order_id=7, user_id=8, status=ok], primaryKeyValue=[7], oldPrimaryKeyValues=[null], type=INSERT, tableName=t_order)]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu merged pull request #11981: Fix Issue#11977 : Scaling increment task of PostgreSQL WalEventConverter ignore correct RowEvent
Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #11981:
URL: https://github.com/apache/shardingsphere/pull/11981
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org