Skip to content

Query hangs for missing attributes #109

@amitdev

Description

@amitdev

This is probably an edge case, but if a record does not have a matching attribute in the data class for AsyncInlineView, the query just "hangs". I don't know if there is a timeout that kicks in after some time, but it doesn't return at least for a 30 seconds.

This happens if we change the "schema" of a table. For eg, if we have something like this:

data class PlaylistInfo(
  @Attribute(name = "partition_key")
  val playlist_token: String,
  val playlist_name: String,
  val playlist_tracks: List<AlbumTrack.Key>
)

and later add a new attribute:

data class PlaylistInfo(
  @Attribute(name = "partition_key")
  val playlist_token: String,
  val playlist_name: String,
  val playlist_tracks: List<AlbumTrack.Key>,
  val playlist_version: Long
)

If we try to read the old records using the new format it hangs (even if we make playlist_version nullable and provide a default value).

It should throw an exception in these cases instead of hanging. Also it would be nice to be able to read old records if the new attributes are nullable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions