skyyyy955 opened a new issue, #11372:
URL: https://github.com/apache/paimon/issues/11372

   ### Search before asking
   
   - [x] I searched existing issues and pull requests for fast-forward cache 
invalidation and Windows path handling.
   
   ### Paimon version
   
   `master` at `d11fd9b38b7ec482a5835f00048d512000122b98` (2.2-SNAPSHOT).
   
   ### Compute Engine
   
   PyPaimon on Windows with Python 3.10.11, PyArrow 19.0.1, and the Python 
execution backend. The tests use the local filesystem and exercise the memory 
and disk caches separately.
   
   ### Minimal reproduce step
   
   From `paimon-python` in that checkout, run the two existing filesystem 
catalog tests.
   
   ```shell
   python -B -m pytest -q -p no:cacheprovider 
pypaimon/tests/filesystem_catalog_branch_test.py -k 
"fast_forward_with_memory_cache or fast_forward_with_disk_cache"
   ```
   
   Both tests write to a local table and branch, warm the cache, fast-forward 
main, and append another row. The append reuses the ID of a snapshot that 
fast-forward removed. 
[Tests](https://github.com/apache/paimon/blob/d11fd9b38b7ec482a5835f00048d512000122b98/paimon-python/pypaimon/tests/filesystem_catalog_branch_test.py#L632-L676)
   
   ### What doesn't meet your expectations?
   
   Reading main after the append should return IDs `[1, 2, 3, 4, 7]`. I get 
`[1, 2, 3, 5, 6]`, the rows from the old main snapshot.
   
   ### Anything else?
   
   The cache looks up `snapshot-3` using the path built from the Windows 
warehouse string. Fast-forward invalidates it using the forward-slash spelling 
returned by the directory listing. The two strings point to the same file and 
produce different cache keys. In the disk test, all 10 old blocks were still on 
disk after invalidation, and the next read hit them. Both tests pass when I 
supply the same warehouse path with forward slashes.
   
   #10980 added metadata replacement and invalidation during fast-forward. This 
case occurs later when a new append reuses a removed snapshot ID. [Fast-forward 
invalidation](https://github.com/apache/paimon/blob/d11fd9b38b7ec482a5835f00048d512000122b98/paimon-python/pypaimon/branch/filesystem_branch_manager.py#L293-L339)
 ยท [Cache 
keys](https://github.com/apache/paimon/blob/d11fd9b38b7ec482a5835f00048d512000122b98/paimon-python/pypaimon/filesystem/caching_file_io.py#L118-L190)
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!
   
   I'd like to make invalidation use the same snapshot path as reads and cover 
both cache modes in the regression test. Could you assign this issue to me?
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to