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/09 11:44:45 UTC

[GitHub] [shardingsphere] taojintianxia commented on issue #10054: Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING

taojintianxia commented on issue #10054:
URL: https://github.com/apache/shardingsphere/issues/10054#issuecomment-895155782


   in my case , there are two way to cause ` Invalid tag` issue
   
   first condition , I use jmh as the tester to get the benchmark of shardingspehre in my IDE, and there is something wrong with the packaging plugin of jmh, the configuration of many SPI lost,  if `org.apache.shardingsphere.sharding.yaml.swapper.ShardingRuleConfigurationYamlSwapper` is not existed in SPI config `org.apache.shardingsphere.infra.yaml.config.swapper.YamlRuleConfigurationSwapper`, this will cause the ` Invalid tag` issue
   
   second condition, I found that every time when I copy the content of a config file , say `config-sharding.yaml`, after I copy the content of that file and paste in IDE  idea, the IDE will help to format the config automatically . and the config style like following 
   
   ```yaml
   rules:
   - !READWRITE_SPLITTING
     dataSources:
       pr_ds:
         writeDataSourceName: write_ds
         readDataSourceNames: [read_ds]
   ```
   
   will change to 
   
   ```yaml
   rules:
     - !READWRITE_SPLITTING
       dataSources:
         pr_ds:
           writeDataSourceName: write_ds
           readDataSourceNames: [read_ds]
   ```
   
   as you can see, the position of `READWRITE_SPLITTING` tag changed. that will also cause invalid tag issue.


-- 
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