mhkeller / mosaic-cache-bug

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mosaic cache bug

The bug

When creating a table from a parquet file using CREATE OR REPLACE, the data is not replaced.

Steps to reproduce

  1. Run the mosaic server with npm run server
  2. Run the web server with npm run dev
  3. Click the Load table_1 button and you should get a scatter plot
  4. Click the Load table_2 button.

Expected result

The chart gets reloaded with different data.

View screencap

Actual result

The same data is loaded.

View screencap

A weird solution

I thought the issue was due to Mosaic cacheing the results so I set the following, which fixes the issue:

await vg.coordinator().configure({
  cache: false
})

However, it doesn't matter what the value of cache here is. The bug is fixed as long as this configure call is made. For example, setting it to the defaults fixes it:

await vg.coordinator().configure({
  cache: true,
  index: true
})

This also fixes it:

await vg.coordinator().configure({})

To enable the fix, un-comment line 9 in src/App.svelte.

About


Languages

Language:JavaScript 88.4%Language:CSS 5.6%Language:Svelte 4.2%Language:HTML 1.7%