Duplicate key __pfn_input_topic__ in presto server #9686
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
When I query a topic with presto
`presto> select * from xxxTable from pulsar."xxxTenant/xxxNamespace"."last-topic-value";
Query 20210222_101426_00019_jvnf5, FAILED, 2 nodes
Splits: 18 total, 0 done (0.00%)
0.79 [0 rows, 0B] [0 rows/s, 0B/s]
You can see it cast a long time, and will not stop.
![image](https://user-images.githubusercontent.com/1859919/108883639-aa2d1d80-7640-11eb-9fea-c64dcd3c62ed.png)
And you can see many error messages in presto server:
Query 20210222_101426_00019_jvnf5 failed: Duplicate key pfn_input_topic (attempted merging values persistent://first-tenant-value/first-namespace-value/first-topic-value and persistent://second-tenant-value/second-namespace-value/second-topic-valu)`
To Reproduce
Steps to reproduce the behavior:
In pulsar version before 2.7.0
Expected behavior
query successfully, and No error.
Screenshots
![Screen Shot 2021-02-24 at 00 16 09](https://user-images.githubusercontent.com/1859919/108872874-9af4a280-7635-11eb-8ce5-04c88108b12b.png)
Desktop (please complete the following information):
Additional Information###
presto can't run in the ruined data came from old pulsar funcations.
Modifications
if key dumplicated, use new one.
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation