Save/Load support for attribute information associated with DocumentProvider#941
Save/Load support for attribute information associated with DocumentProvider#941sampathrg wants to merge 9 commits intosync-from-cdb-diskannfrom
Conversation
| pub(crate) trait LabelFilePath { | ||
| fn label_file_path(&self) -> String; | ||
| } | ||
|
|
||
| impl LabelFilePath for String { | ||
| fn label_file_path(&self) -> String { | ||
| format!("{}.labels.bin", self) | ||
| } | ||
| } | ||
|
|
||
| impl LabelFilePath for AsyncIndexMetadata { | ||
| fn label_file_path(&self) -> String { | ||
| format!("{}.labels.bin", self.prefix()) | ||
| } | ||
| } | ||
|
|
||
| impl LabelFilePath for (u32, AsyncIndexMetadata) { | ||
| fn label_file_path(&self) -> String { | ||
| format!("{}.labels.bin", self.1.prefix()) | ||
| } | ||
| } | ||
|
|
||
| impl LabelFilePath for (u32, u32, DiskGraphOnly) { | ||
| fn label_file_path(&self) -> String { | ||
| format!("{}.labels.bin", self.2.prefix()) | ||
| } | ||
| } | ||
|
|
||
| impl LabelFilePath for AsyncQuantLoadContext { | ||
| fn label_file_path(&self) -> String { | ||
| format!("{}.labels.bin", self.metadata.prefix()) | ||
| } | ||
| } |
There was a problem hiding this comment.
This is a side effect of the auxiliary input for save_wtih and load_with not having any constrains. Different implementations use different inputs. This would be difficult to maintain, should we constrain the auxiliary input in some meaningful way? Perhaps all of them should implement a trait that returns a prefix?
|
@suhasjs @sampathrg how does this proposal relate to the serialization RFC that Suhas proposed? |
@harsha-simhadri - I was made aware of the RFC after I raised the PR. I went through the RFC, from what I can tell this PR will add additional work to the effort proposed by RFC since this PR is using the |
This PR adds ability to do Save/Load attribute information associated with DocumentProvider. The information is saved in the following binary format:
There's a draft RFC for this (#868). I went ahead and created a PR because the RFC had enough details. The PR currently targets an unmerged branch associated with #782. I will target this to main once that PR gets merged.